问题
Hello I have created an android application in that I wants to GCM Register id.
My code is-
GCMRegistrar.checkDevice(this);
GCMRegistrar.checkManifest(this);
final String regId = GCMRegistrar.getRegistrationId(this);
if (regId.equals(""))
{
GCMRegistrar.register(this, SENDER_ID);
}
Log.v("REG ID:",""+regId);
But it gives error like-
Resetting backoff for 'Package Name'
What is meaning of this error ?
回答1:
Have you added the following Permission and Kindly check whether your Sender Id is in Live or not.
<uses-permission android:name="com.example.permission.C2D_MESSAGE" />
<!-- This app has permission to register and receive data message. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="com.example.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
回答2:
I guess your GCMIntentService is not well defined ?
Please check out this:)
I can not get registration ID from Android GCM
来源:https://stackoverflow.com/questions/23214284/resetting-backoff-for-package-name