├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── ic_close.png │ │ │ │ ├── background.png │ │ │ │ ├── chatbot_icon.png │ │ │ │ ├── background_green_radius.xml │ │ │ │ ├── background_second_color_radius.xml │ │ │ │ ├── background_primary_color_radius.xml │ │ │ │ ├── button_shape_pressed.xml │ │ │ │ ├── button_shape_selected.xml │ │ │ │ ├── button_shape_disabled.xml │ │ │ │ ├── button_shape_unselected.xml │ │ │ │ ├── suggestion_background.xml │ │ │ │ ├── ic_baseline_close.xml │ │ │ │ ├── green_button_background.xml │ │ │ │ ├── ic_refresh_black_24dp.xml │ │ │ │ ├── peper_talk_background.xml │ │ │ │ ├── top_right_rounded_background.xml │ │ │ │ ├── peper_talk_green_background.xml │ │ │ │ ├── top_left_rounded_background.xml │ │ │ │ ├── green_top_left_rounded_background.xml │ │ │ │ ├── green_top_right_rounded_background.xml │ │ │ │ ├── button_background_selector.xml │ │ │ │ ├── ic_img_icon_pepper.xml │ │ │ │ ├── ic_img_icon_humanmen.xml │ │ │ │ └── ic_launcher_background.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── values │ │ │ │ ├── dimens.xml │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── color │ │ │ │ └── button_text_color_selector.xml │ │ │ ├── layout │ │ │ │ ├── activity_app_introduction.xml │ │ │ │ └── activity_main.xml │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ └── raw │ │ │ │ ├── dlg_how_are_you.top │ │ │ │ ├── dlg_move_arms.top │ │ │ │ ├── dlg_hello.top │ │ │ │ ├── dlg_robot_origins.top │ │ │ │ ├── uplarm.qianim │ │ │ │ ├── uprarm.qianim │ │ │ │ ├── stretchrarm.qianim │ │ │ │ ├── stretchlarm.qianim │ │ │ │ ├── dlg_robot_personal_info.top │ │ │ │ └── stretchbotharms.qianim │ │ ├── assets │ │ │ ├── robot │ │ │ │ └── robotsdk.xml │ │ │ └── fonts │ │ │ │ └── OpenSans-Regular.ttf │ │ ├── java │ │ │ └── com │ │ │ │ └── softbankrobotics │ │ │ │ └── chatbotsample │ │ │ │ ├── UiNotifier.java │ │ │ │ ├── EmptyChatbotReaction.java │ │ │ │ ├── dialogflow │ │ │ │ ├── RequestTask.java │ │ │ │ └── DialogflowAgent.java │ │ │ │ ├── AppRequirementActivity.java │ │ │ │ ├── ChatbotUtteredReaction.java │ │ │ │ ├── AppIntroductionActivity.java │ │ │ │ ├── MyQiChatExecutor.java │ │ │ │ ├── DialogflowChatbot.java │ │ │ │ ├── MainActivity.java │ │ │ │ └── Robot.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── softbankrobotics │ │ │ └── chatbotsample │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── softbankrobotics │ │ └── chatbotsample │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── DialogflowChatbotAgent.zip ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── CHANGELOG.md ├── classDiagram.plantuml ├── COPYING.md ├── sequenceDiagram.plantuml ├── gradlew.bat ├── .gitignore ├── README.md └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /DialogflowChatbotAgent.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aldebaran/qisdk-sample-chatbot/HEAD/DialogflowChatbotAgent.zip -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aldebaran/qisdk-sample-chatbot/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aldebaran/qisdk-sample-chatbot/HEAD/app/src/main/res/drawable/ic_close.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aldebaran/qisdk-sample-chatbot/HEAD/app/src/main/res/drawable/background.png -------------------------------------------------------------------------------- /app/src/main/assets/robot/robotsdk.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/chatbot_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aldebaran/qisdk-sample-chatbot/HEAD/app/src/main/res/drawable/chatbot_icon.png -------------------------------------------------------------------------------- /app/src/main/assets/fonts/OpenSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aldebaran/qisdk-sample-chatbot/HEAD/app/src/main/assets/fonts/OpenSans-Regular.ttf -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aldebaran/qisdk-sample-chatbot/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aldebaran/qisdk-sample-chatbot/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aldebaran/qisdk-sample-chatbot/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aldebaran/qisdk-sample-chatbot/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aldebaran/qisdk-sample-chatbot/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aldebaran/qisdk-sample-chatbot/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aldebaran/qisdk-sample-chatbot/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aldebaran/qisdk-sample-chatbot/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aldebaran/qisdk-sample-chatbot/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aldebaran/qisdk-sample-chatbot/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/background_green_radius.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/background_second_color_radius.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/background_primary_color_radius.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_shape_pressed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_shape_selected.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Oct 25 13:47:01 CEST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_shape_disabled.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_shape_unselected.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/softbankrobotics/chatbotsample/UiNotifier.java: -------------------------------------------------------------------------------- 1 | package com.softbankrobotics.chatbotsample; 2 | 3 | import com.aldebaran.qi.sdk.object.conversation.Phrase; 4 | 5 | import java.util.List; 6 | 7 | public interface UiNotifier { 8 | void setText(String text); 9 | 10 | void isDialogFlow(boolean dialogFlow); 11 | void updateQiChatSuggestions(List recommendation); 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/suggestion_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_close.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/green_button_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24sp 4 | 2dp 5 | 7dp 6 | 10dp 7 | 10dp 8 | 15dp 9 | 5dp 10 | 25dp 11 | -------------------------------------------------------------------------------- /app/src/test/java/com/softbankrobotics/chatbotsample/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.softbankrobotics.chatbotsample; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_refresh_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/peper_talk_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 12 | 13 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/top_right_rounded_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 12 | 13 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/peper_talk_green_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 12 | 13 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/top_left_rounded_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 12 | 13 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/green_top_left_rounded_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 12 | 13 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/green_top_right_rounded_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 12 | 13 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/color/button_text_color_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 10 | 15 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_background_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 10 | 15 | 17 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ChatbotSample 3 | QiChatBot 4 | Dialog Flow 5 | \"%s\" 6 | 7 | 8 | 9 | \"no\" 10 | \"yes\" 11 | Retry 12 | Settings 13 | Exit 14 | Skip 15 | 16 | With the power of local and remote chat bots, I will try to reply to what you will say. Here are some examples of things you can tell me. 17 | you can say… 18 | 19 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/softbankrobotics/chatbotsample/EmptyChatbotReaction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 Softbank Robotics Europe 3 | * See COPYING for the license 4 | */ 5 | package com.softbankrobotics.chatbotsample; 6 | 7 | import com.aldebaran.qi.sdk.QiContext; 8 | import com.aldebaran.qi.sdk.object.conversation.BaseChatbotReaction; 9 | import com.aldebaran.qi.sdk.object.conversation.SpeechEngine; 10 | 11 | /** 12 | * A ChatbotReaction that does nothing. 13 | */ 14 | public class EmptyChatbotReaction extends BaseChatbotReaction { 15 | 16 | EmptyChatbotReaction(final QiContext context) { 17 | super(context); 18 | } 19 | 20 | @Override 21 | public void runWith(final SpeechEngine speechEngine) { 22 | // Not used. 23 | } 24 | 25 | @Override 26 | public void stop() { 27 | // Not used. 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/softbankrobotics/chatbotsample/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.softbankrobotics.chatbotsample; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.softbankrobotics.chatbotsample", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_app_introduction.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 |