Reputation: 5052
I'm wondering something about RegistrationID
var regid = gcm.register(SenderID);
Technically, when register method run, gcm takes SenderID and probably some unique value of my device then creates RegistrationID
In my scenario, i've instant messaging app that uses gcm. Now i am getting an account in that app, then gcm sends RegistrationID thats ok. If i wanted to get new account on same device, it does not give new RegistrationID normally.
How can gcm give diffrent RegistrationID for same application and same device ?
Upvotes: 1
Views: 186
Reputation: 45490
The registration ID is supposed to be unique per app.
Maybe what you need is to add some checks for the signed in user for your app to behave differently when you receive the notification.
for example in onHandleIntent
method
@Override
protected void onHandleIntent(Intent intent) {
if(userId==user_id){
//display notification
}
}
Upvotes: 0