Created
September 29, 2017 13:38
-
-
Save jirawatee/02bac94ca08add0cb05f52911bf5df61 to your computer and use it in GitHub Desktop.
Firebase Invites - Callback
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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