Skip to content

Instantly share code, notes, and snippets.

@AnasAlmasri
Created April 21, 2019 03:58
Show Gist options
  • Save AnasAlmasri/ebaf57d51fbb6cd0fcf1006ac0e281d8 to your computer and use it in GitHub Desktop.
Save AnasAlmasri/ebaf57d51fbb6cd0fcf1006ac0e281d8 to your computer and use it in GitHub Desktop.
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK && data != null) {
switch (requestCode) {
case 10:
case 20:
case 30:
}
} else {
Toast.makeText(getApplicationContext(), "Failed to recognize speech!", Toast.LENGTH_LONG).show();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment