Skip to content

Instantly share code, notes, and snippets.

@fevziomurtekin
Created January 25, 2019 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fevziomurtekin/dab75e21853345a21b21cd8fe736aa0d to your computer and use it in GitHub Desktop.
Save fevziomurtekin/dab75e21853345a21b21cd8fe736aa0d to your computer and use it in GitHub Desktop.
fun onResult(response: DetectIntentResponse?) {
try {
if (response != null) {
var botReply:String=""
if(response.queryResult.fulfillmentText==" ")
botReply= response.queryResult.fulfillmentMessagesList[0].text.textList[0].toString()
else
botReply= response.queryResult.fulfillmentText
appendText(botReply, BOT)
} else {
appendText(getString(R.string.anlasilmadi), BOT)
}
}catch (e:Exception){
appendText(getString(R.string.anlasilmadi), BOT)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment