SERVICE_NOT_AVAILABLE在Android GCM一些设备 [英] SERVICE_NOT_AVAILABLE some devices on Android GCM

查看:566
本文介绍了SERVICE_NOT_AVAILABLE在Android GCM一些设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用GCM的通知应用程序。我用这个教程中,我的code是pretty很多相同

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

我测试的物理设备和一些设备,我得到一个错误SERVICE_NOT_AVAILABLE当我尝试将设备与GCM注册。

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.

它适用于约一半我的测试设备的人得到一个SERVICE_NOT_AVAILABLE错误。看了遍,也没有找到一个解决办法。

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.

任何帮助将大大AP preciated。谢谢!

Any help would be greatly appreciated. Thank You!

推荐答案

<一个href=\"http://developer.android.com/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html#ERROR_SERVICE_NOT_AVAILABLE\"相对=nofollow> SERVICE_NOT_AVAILABLE 可能意味着你的设备无法读取响应或有从服务器500/503。你已经有一个指数回退所以服务器端不应该是我想的一个问题。看看你是否有com.google.android.c2dm.intent.REGISTRATION在你的清单中GCMBroadcastReceiver和你要处理的。退房:<一href=\"http://stackoverflow.com/questions/17618982/gcm-service-not-available-on-android-2-2/17721385#17721385\">GCM在Android 2.2 SERVICE_NOT_AVAILABLE详细的解决方案,如果您还没有。注释如果工程。

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.

这篇关于SERVICE_NOT_AVAILABLE在Android GCM一些设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆