Skip to content

Instantly share code, notes, and snippets.

@fevziomurtekin
Created January 25, 2019 13:08
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/eb253517d1c470283e46a0f0800e1925 to your computer and use it in GitHub Desktop.
Save fevziomurtekin/eb253517d1c470283e46a0f0800e1925 to your computer and use it in GitHub Desktop.
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
when(requestCode){
SPEECH_INPUT->{
if(resultCode== Activity.RESULT_OK
&& data !=null){
val result = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS)
edittext.text=Editable.Factory.getInstance().newEditable(result[0])
sendMessage(send)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment