Start a new topic

Android disablePush doesn't remove GCM association from user

Not sure if it is the correct way to remove GCM id from the user, but client.push().disablePush() won't do that and I don't receive the onUnregistered event in the kinveyGCMService.

1 person has this question

Hey, this looks like a bug in the android library. I'll do some investigation for the fix, and keep you posted. Thanks for your patience and reporting the issue!

But i have to ask, without the unsubscribe, is it possible to enable the same device on other login?

I assume the same login with other device is ok, since I saw an array in the _push column.
Yes, it is possible. Push tokens are stored in an array, and you can add as many as you want.

I've been doing some more testing with unregisteration, and it is removing the fields from the user object, so I'm going to need some more information to figure out what might be going wrong.

Can you confirm the device is online the whole time? Also, the unregistration process needs an active user so don't call logout.

Can you watch the logs after calling the method? You should see:

"Device unregistered"

and then a moment later, after a request has been completed,

"retrieved user, about to register with Kinvey."

"about to register with Kinvey"

and after that final call completes successfully it should call unregister. If you see any error statements logcat (red text), can you post them here?
Ok, I'll try to get the log here ASAP. Right now I'm doing other task.

But I can assure that the device was connected all the time and that I've tried to unregister before logout and after logout also.

This time I'll pay more attention to the logcat and paste the result here.

Ok, it looks like it's all there

02-10 11:09:50.339: V/GCMRegistrar(27705): Saving regId on app version 1

02-10 11:09:50.386: V/GCMBaseIntentService(27705): Device unregistered

02-10 11:09:50.573: V/GCMBaseIntentService(27705): Releasing wakelock

02-10 11:09:50.714: V/GCMRegistrar(27705): Unregistering receiver

02-10 11:09:52.425: V/GCMBaseIntentService(27705): retrieved user, about to register with Kinvey.

02-10 11:09:52.425: V/Kinvey - Client(27705): about to register with Kinvey

02-10 11:09:56.120: I/Kinvey - Client(27705): Serialization success

02-10 11:09:56.159: V/Kinvey - Client(27705): Serialization success

02-10 11:11:19.675: I/Kinvey - Client(27705): GCM - onUnregister

I even get to KinveyGCMService onUnregistered event but when I checkout the GCM array on the user, the id is still there. I've waited for about 15 minutes in some kind of slow update in the browser, but with no effect.

Hey, I'll have to do some more investigation to figure out what might be going on-- just to confirm, are you unregistering the currently logged in user or another user?

Also, as a workaround, you can just empty out the field manually and call update--

client.user().put("_push", "");

client.user().update(new KinveyUserCallback() {


public void onSuccess(User result) {

//To change body of implemented methods use File | Settings | File Templates.



public void onFailure(Throwable error) {

//To change body of implemented methods use File | Settings | File Templates.


I try to unregister the current logged user. The log I sent you was done after I've logged and logged out. I event commented the line where the user is sign out because you said the user must be logged.


Login or Signup to post a comment