TYPE | VERSION | STATUS | COVERAGE | |
---|---|---|---|---|
demo |
demo | |||
interactive-chat |
library |
Check: VUI SDK
A component to create a conversational flow interface for mobile apps that supports interactions in both UI and Voice.
- Ability to create a conversational flow
- Combines voice capabilities with the UI
- Contains several Node Components ready to use
- You can personalize the experience with your own callbacks
The SDK works on Android version 5.0 (Lollipop) and above. (for lower versions contact us)
repositories {
// Optional. Access to early versions not yet published.
maven { url "https://dl.bintray.com/chattylabs/maven" }
}
dependencies {
// Required
implementation 'com.chattylabs.sdk.android:interactive-chat:<latest version>'
}
The following only illustrate a manual way to generate and start a conversation between the app and the user.
val component = InteractiveChatComponent.Builder()
.withViewComponent(recyclerView)
.withVoiceComponent(voiceComponent)
.build()
with(component) {
// Add nodes
addNode(TextMessage.Builder("message_id_1").setText(R.string.message1).build())
addNode(ActionText.Builder("action_ok").setText(R.string.ok).build())
addNode(ActionText.Builder("action_ok").setText(R.string.ko).build())
addNode(TextMessage.Builder("message_id_2").setText(R.string.message1).build())
addNode(ActionText.Builder("action_one").setText(R.string.one).build())
addNode(ActionText.Builder("action_two").setText(R.string.two).build())
// Setup the flow
with(prepare()) {
// Build the relationship
from("message_id_1").to("action_ko", "action_ok")
from("action_ok").to("message_id_2")
from("message_id_2").to("action_one", "action_two")
// Setup the Speech and start the flow
setupSpeech(context, status -> start(getNode("message_id_1")))
}
}
Check the wiki to see how you can create your own custom Node Components