I am stuck in the process of creating push notifications using Google cloud notifications.
I am working on where I should get the device identifier in order to subsequently use this device identifier when I need to send a push notification.
So, I have this code:
GCMRegistrar.checkDevice(this); GCMRegistrar.checkManifest(this); final String regId = GCMRegistrar.getRegistrationId(this); if (regId.equals("")) { GCMRegistrar.register(this, SENDER_ID); } else {
and I thought this line
final String regId = GCMRegistrar.getRegistrationId(this);
I was going to get the device identifier so that I could save it somewhere. But I think that I am aloof from how it is actually intended to work. Can someone please explain to me how I can get a unique device identifier so that I can store it for future push notifications?
source share