[Aerogear-users] Get the deviceToken - Android

hh henry.hertoghe at gmail.com
Tue Apr 19 09:48:10 EDT 2016

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

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

 if (instanceId == null) {
                        instanceId = instanceIdProvider.get(context);
                    String token = instanceId.getToken(senderId,
                    deviceToken = token;

while for the unregister method there is nothing, so I don't see how the
deviceToken could not be null?



View this message in context: http://aerogear-users.1116366.n5.nabble.com/Get-the-deviceToken-Android-tp619p621.html
Sent from the aerogear-users mailing list archive at Nabble.com.

More information about the Aerogear-users mailing list