Wednesday 15 June 2011

android - StackMob failing to send broadcast push notification because of "no C2DM ClientLogin token" -


I am trying to implement push notifications through the stackmab on the existing Android app. I am trying to find a solution to my problem through my tutorial and Dev Center, but I can not do the sender's ID (actual reasons have been replaced with # for special reasons) in my app's connectivity connectivity :

  public static string SENDER_ID = "############";   

I also have the init function (again, public and private key replaced in this code) from the Google API Console:

  Stackmob Android Init (this .getApplicationContext (), StackMob.OAuthVersion.One, 0, "Public key from the STACKMOB Dashboard>", "Private key from the STACKMOB Dashboard;););   

To get the information from what I think, any device must be registered, which is below the init:

  try {final string regId = GCMRGistar.ag. Triggering ID; if (regId.equals ("")) {registerForPush ();} Else {Log.e ("base activity", "users are already registered for push notifications");}} hold (unsupported) Option Espension E. {Log.e ("BaseActivity", "This device does not support GCM. Push will not work");} Private Wide RegisterForPash {GCMRegistrar.register (this, SENDER_ID);}   

When I run my app, then send me the sender's com com.example.android ############ in Logcat, this The AFAIK my device is registered to receive push notifications, but when I try to send a push notification from the stackmab dashboard and check the log with that push, then I'll send the message

  Failed to send "{alert": "deadbeef"} Because there is no C2 DM, the client login token for version = 0   

can someone tell me what the log message actually tells me Tell me

There are two versions of Android push: old C2DM and new GCM you have registered token for any of these And StackMob will send a message using the appropriate certificate. C2DM has been deprecated, so all SDK registers are registered as GCM by default and in the same way you configure push instructions with sender_ID and its accompanying.

Your token has been accidentally entered as C2DD when we move forward, we see that you do not have any credentials and print that message. The solution is to remove the token through push console and re-register it as GCM.

The real question is how did you enter the C2 DM Token for the first time. If a stackbox device or demo is not the default of GCM and C2DM is clearly marked as a legacy, then let me know.

No comments:

Post a Comment