android - How to force device to get new GCM ID? -


I'm having a strange oscillation with my app - I have two devices on which I test it. One is 4.4.4, the second is 4.0.4. I have created an app that used GCM, it worked on both phones without a problem, then I made a second one, which had GCM module that was pasted without the first one, without any changes.

Now, when I send a GCM message to KitKat, it gets without problems but I can not see it on another phone. This does not register at all (the broadcast receiver does not receive anything) All the while the first app is still working properly, both phones have the right APK installed through ADB.

I store the GCM registration ID in the phone, even when I run the app on KitKat, get an ID, get the app, erase data, run it again - I get the second time the second time. It does not happen with other phones, which makes me believe that there has been an error from Google.

I stumbled on this thread, probably dealing with the same problem. I tried to re-install the app, but he did not help, I still get the old (non-working) GCM ID


tl; Dr I get a GCM message on a phone, while one app works on another. There is probably a problem in registering GCM. On the restore I still get the same GCM ID


< P> Edit: The necessary information was provided in the answer given below, yet it did not fix the problem. I will open another thread to avoid misleading title.

I do not think that obtaining a new registration ID will solve your problem, but a new registration The way I use to get the ID:

  1. Uninstall the app.
  2. Send a GCM message to the old registration ID, until you receive a NotRegistered error in Google's response, repeat this step.
  3. Reinstall the app, which must be re-registered to GCM, and this time you must be new Registration ID

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -