Question

I made an app using GCM for notifications. I used this tutorial and my code is pretty much identical

http://developer.android.com/google/gcm/client.html

I'm testing on physical devices and on some of the devices I am getting a SERVICE_NOT_AVAILABLE error when I try to register the device with GCM.

I have an exponential backoff setup so it does retry over time.

It works on about half of my test devices the others get a SERVICE_NOT_AVAILABLE error. Looked all over and haven't found a solution yet.

Any help would be greatly appreciated. Thank You!

Was it helpful?

Solution 2

SERVICE_NOT_AVAILABLE might mean that your device can't read the response or there was a 500/503 from the server. You already have a exponential back-off so server side shouldn't be a problem I suppose. See if you have "com.google.android.c2dm.intent.REGISTRATION" to the GCMBroadcastReceiver in your manifest and you are handling that. Check out : GCM SERVICE_NOT_AVAILABLE on Android 2.2 for detailed solution, if you haven't already. Comment if that works.

OTHER TIPS

You will also get this error if you simply do not have network connection.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top