Skip to content

Instantly share code, notes, and snippets.

@jirawatee
Created September 29, 2017 13:38
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 jirawatee/02bac94ca08add0cb05f52911bf5df61 to your computer and use it in GitHub Desktop.
Save jirawatee/02bac94ca08add0cb05f52911bf5df61 to your computer and use it in GitHub Desktop.
Firebase Invites - Callback
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
Log.d(TAG, "onActivityResult: requestCode=" + requestCode + ", resultCode=" + resultCode);
if (requestCode == REQUEST_INVITE) {
if (resultCode == RESULT_OK) {
// Get the invitation IDs of all sent messages
String[] ids = AppInviteInvitation.getInvitationIds(resultCode, data);
for (String id : ids) {
Log.d(TAG, "onActivityResult: sent invitation " + id);
}
} else {
Toast.makeText(this, R.string.send_failed, Toast.LENGTH_LONG).show();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment