I am using app invite in my code. When user invite to other user, I am rewarding app user with some points. So here the problem is that, in response after invitation I am getting ids and those ids are always unique even I send invitation to same email or mobile number. So I can't detect that app user has invited to same user multiple time and user gets some reward points for same user again and again. Is there any mechanism to detect duplicate invitation ?
Any help would be appreciated, I got stuck..
@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 {
// Sending failed or it was canceled, show failure message to the user
// ...
}
} }