-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #510 from bounswe/mobile/feature/chatbot-implement…
…ation-#465 Mobile/feature/chatbot implementation #465
- Loading branch information
Showing
5 changed files
with
65 additions
and
20 deletions.
There are no files selected for viewing
9 changes: 8 additions & 1 deletion
9
app/mobile/bounswe5_mobile/android/app/src/debug/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.example.bounswe5_mobile"> | ||
package="com.example.bounswe5_mobile" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
<!-- The INTERNET permission is required for development. Specifically, | ||
the Flutter tool needs it to communicate with the running application | ||
to allow setting breakpoints, to provide hot reload, etc. | ||
--> | ||
<application | ||
tools:replace="android:label" | ||
android:label="application@label" | ||
> | ||
</application> | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
</manifest> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:kommunicate_flutter/kommunicate_flutter.dart'; | ||
|
||
void main() { | ||
runApp(const MaterialApp( | ||
title: 'Navigation Basics', | ||
home: ChatbotScreen(), | ||
)); | ||
} | ||
|
||
class ChatbotScreen extends StatelessWidget { | ||
const ChatbotScreen({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
body: Center( | ||
child: ElevatedButton( | ||
child: const Text('Start Conversation'), | ||
onPressed: () async { | ||
try { | ||
dynamic conversationObject = { | ||
'appId': '35f067c7290c8f7f05b2575bf22b44440', | ||
'isSingleConversation' : false | ||
}; | ||
dynamic result = await KommunicateFlutterPlugin.buildConversation(conversationObject); | ||
print("Conversation builder success : " + result.toString()); | ||
} on Exception catch (e) { | ||
print("Conversation builder error occurred : " + e.toString()); | ||
} | ||
}, | ||
), | ||
), | ||
); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters