1
我在使用cordova推送通知插件註冊Android設備時收到以下logcat消息。在使用GCM和PushWoosh註冊Android設備時收到錯誤消息
01-25 19:33:34.871: V/GCMRegistrar(6495): Is registered on server: false
01-25 19:33:34.871: D/GCMRegistrar(6495): resetting backoff for com.example.homework
01-25 19:33:34.941: V/GCMRegistrar(6495): Registering app com.example.homework of senders 19845108581
01-25 19:33:35.011: D/memalloc(6495): ashmem: Mapped buffer base:0x534bb000 size:1536000 fd:90
01-25 19:33:35.011: D/CordovaLog(6495): report:deviceready
01-25 19:33:35.011: I/Web Console(6495): report:deviceready at file:///android_asset/www/js/index.js:122
01-25 19:33:35.162: V/GCMBroadcastReceiver(6495): onReceive: com.google.android.c2dm.intent.REGISTRATION
01-25 19:33:35.162: V/GCMBroadcastReceiver(6495): GCM IntentService class: com.arellomobile.android.push.PushGCMIntentService
01-25 19:33:35.172: V/GCMBaseIntentService(6495): Acquiring wakelock
01-25 19:33:35.192: D/GCMBaseIntentService(6495): handleRegistration: registrationId = null, error = SERVICE_NOT_AVAILABLE, unregistered = null
01-25 19:33:35.192: D/GCMBaseIntentService(6495): Registration error: SERVICE_NOT_AVAILABLE
01-25 19:33:35.192: I/GCMIntentService(6495): Received recoverable error: SERVICE_NOT_AVAILABLE
01-25 19:33:35.192: D/GCMBaseIntentService(6495): Scheduling registration retry, backoff = 2788 (3000)
01-25 19:33:35.192: D/Socket_Alarm(6495): registerHTCSocketMonitorCallBack
01-25 19:33:35.192: D/Socket_Alarm(6495): set mSocketMonitor
01-25 19:33:35.192: D/Socket_Alarm(6495): HTCSocketMonitorImpl::HTCSocketMonitorImpl
01-25 19:33:35.352: V/GCMBaseIntentService(6495): Releasing wakelock
01-25 19:33:36.603: D/DroidGap(6495): onMessage(spinner,stop)
01-25 19:35:03.978: V/webview(6495): hitTestResult use fallback
我在JavaScript文件中設置了projectid和appid的正確值。並且我的Android設備也配置了Google帳戶。我遵循本指南 http://www.pushwoosh.com/programming-push-notification/android-gcm-push-notifications-guide/
任何建議都會有所幫助。
您收到「SERVICE_NOT_AVAILABLE」錯誤。也許您的設備在您的應用試圖註冊時未連接到互聯網,或者Google服務可能停機(這種情況不太可能)。 – Eran
不,該設備通過WiFi有效的互聯網連接,其工作正常。我發現錯誤「SERVICE_NOT_AVAILABLE」出現錯誤500-599範圍(例如500或503),這表明GCM服務器在嘗試處理請求時存在內部錯誤,或者服務器暫時不可用。我不斷嘗試超過3-4天的服務,並顯示相同的錯誤。 – sourav