Hi Daniel,
Thanks for your reply.
I knew about the "unregister" method but it didn't do his job perfectly, as
sometimes it wasn't unregistered and I had the following block & error which
where throwed.
if ((deviceToken == null) || (deviceToken.trim().equals(""))) {
throw new
IllegalStateException(DEVICE_ALREADY_UNREGISTERED);
}
But my device was still registered, so I don't really understand why this
error was throwed.
Probably, the deviceToken is null, as for the register method, we have the
following:
if (instanceId == null) {
instanceId = instanceIdProvider.get(context);
}
String token = instanceId.getToken(senderId,
GoogleCloudMessaging.INSTANCE_ID_SCOPE);
deviceToken = token;
while for the unregister method there is nothing, so I don't see how the
deviceToken could not be null?
Thanks,
Henry
--
View this message in context:
http://aerogear-users.1116366.n5.nabble.com/Get-the-deviceToken-Android-t...
Sent from the aerogear-users mailing list archive at
Nabble.com.