简体   繁体   English

GCM在Nexus 7上不起作用,在Samsung Galaxy S3上不起作用

[英]GCM is not working on Nexus 7 it is on Samsung Galaxy S3

So i have implemented GCM into my app with help of the AndroidHive tutorial. 因此,借助AndroidHive教程,我已在自己的应用程序中实现了GCM。

The push messages used to work on both of my devices Samsung Galaxy S3 and Nexus 7. But now the push notifications only work on my samsung galaxy s3 and it gives an error to my Nexus 7. My nexus 7 does not want to register anymore. 推送消息曾经在我的两个设备Samsung Galaxy S3和Nexus 7上都可以使用。但是现在,推送通知仅在我的三星galaxy s3上起作用,并且给Nexus 7提供了错误。我的nexus 7不再想要注册。 when i attempt to register my Nexus 7 i get this: 当我尝试注册Nexus 7时,出现以下信息:

    01-01 07:46:33.396: V/GCMBroadcastReceiver(10980): onReceive: com.google.android.c2dm.intent.REGISTRATION
01-01 07:46:33.396: V/GCMBroadcastReceiver(10980): GCM IntentService class: com.toviehd.remake.GCMIntentService
01-01 07:46:33.396: V/GCMBaseIntentService(10980): Acquiring wakelock
01-01 07:46:33.426: V/GCMBaseIntentService(10980): Intent service name: GCMIntentService-725930664821-1
01-01 07:46:33.426: E/GCMRegistrar(10980): internal error: retry receiver class not set yet
01-01 07:46:33.426: V/GCMRegistrar(10980): Registering receiver
01-01 07:46:33.436: D/GCMBaseIntentService(10980): handleRegistration: registrationId = null, error = SERVICE_NOT_AVAILABLE, unregistered = null
01-01 07:46:33.436: D/GCMBaseIntentService(10980): Registration error: SERVICE_NOT_AVAILABLE
01-01 07:46:33.436: I/GCMIntentService(10980): Received recoverable error: SERVICE_NOT_AVAILABLE
01-01 07:46:33.446: D/GCMBaseIntentService(10980): Scheduling registration retry, backoff = 1573 (3000)
01-01 07:46:33.466: V/GCMBaseIntentService(10980): Releasing wakelock
01-01 07:46:34.796: D/dalvikvm(10980): GC_CONCURRENT freed 212K, 5% free 8010K/8376K, paused 1ms+3ms, total 20ms
01-01 07:46:34.976: D/dalvikvm(10980): GC_CONCURRENT freed 273K, 6% free 8159K/8592K, paused 3ms+3ms, total 24ms
01-01 07:46:35.026: V/GCMBroadcastReceiver(10980): onReceive: com.google.android.gcm.intent.RETRY
01-01 07:46:35.026: V/GCMBroadcastReceiver(10980): GCM IntentService class: com.toviehd.remake.GCMIntentService
01-01 07:46:35.026: V/GCMBaseIntentService(10980): Acquiring wakelock
01-01 07:46:35.036: V/GCMBaseIntentService(10980): Intent service name: GCMIntentService-725930664821-2
01-01 07:46:35.036: V/GCMRegistrar(10980): Registering app com.toviehd.remake of senders 725930664821
01-01 07:46:35.046: V/GCMBaseIntentService(10980): Releasing wakelock
01-01 07:46:35.146: V/GCMBroadcastReceiver(10980): onReceive: com.google.android.c2dm.intent.REGISTRATION
01-01 07:46:35.146: V/GCMBroadcastReceiver(10980): GCM IntentService class: com.toviehd.remake.GCMIntentService
01-01 07:46:35.146: V/GCMBaseIntentService(10980): Acquiring wakelock
01-01 07:46:35.176: V/GCMBaseIntentService(10980): Intent service name: GCMIntentService-725930664821-3
01-01 07:46:35.176: D/GCMBaseIntentService(10980): handleRegistration: registrationId = null, error = SERVICE_NOT_AVAILABLE, unregistered = null
01-01 07:46:35.176: D/GCMBaseIntentService(10980): Registration error: SERVICE_NOT_AVAILABLE
01-01 07:46:35.176: I/GCMIntentService(10980): Received recoverable error: SERVICE_NOT_AVAILABLE
01-01 07:46:35.186: D/GCMBaseIntentService(10980): Scheduling registration retry, backoff = 5157 (6000)
01-01 07:46:35.196: V/GCMBaseIntentService(10980): Releasing wakelock
01-01 07:46:35.996: D/dalvikvm(10980): GC_CONCURRENT freed 359K, 6% free 8220K/8736K, paused 3ms+4ms, total 22ms
01-01 07:46:36.116: D/dalvikvm(10980): GC_CONCURRENT freed 332K, 7% free 8332K/8868K, paused 3ms+3ms, total 24ms
01-01 07:46:40.346: V/GCMBroadcastReceiver(10980): onReceive: com.google.android.gcm.intent.RETRY
01-01 07:46:40.346: V/GCMBroadcastReceiver(10980): GCM IntentService class: com.toviehd.remake.GCMIntentService
01-01 07:46:40.346: V/GCMBaseIntentService(10980): Acquiring wakelock
01-01 07:46:40.356: V/GCMBaseIntentService(10980): Intent service name: GCMIntentService-725930664821-4
01-01 07:46:40.356: V/GCMRegistrar(10980): Registering app com.toviehd.remake of senders 725930664821
01-01 07:46:40.366: V/GCMBaseIntentService(10980): Releasing wakelock
01-01 07:46:40.466: V/GCMBroadcastReceiver(10980): onReceive: com.google.android.c2dm.intent.REGISTRATION
01-01 07:46:40.466: V/GCMBroadcastReceiver(10980): GCM IntentService class: com.toviehd.remake.GCMIntentService
01-01 07:46:40.466: V/GCMBaseIntentService(10980): Acquiring wakelock
01-01 07:46:40.476: V/GCMBaseIntentService(10980): Intent service name: GCMIntentService-725930664821-5
01-01 07:46:40.486: D/GCMBaseIntentService(10980): handleRegistration: registrationId = null, error = SERVICE_NOT_AVAILABLE, unregistered = null
01-01 07:46:40.486: D/GCMBaseIntentService(10980): Registration error: SERVICE_NOT_AVAILABLE
01-01 07:46:40.486: I/GCMIntentService(10980): Received recoverable error: SERVICE_NOT_AVAILABLE
01-01 07:46:40.486: D/GCMBaseIntentService(10980): Scheduling registration retry, backoff = 8885 (12000)
01-01 07:46:40.496: V/GCMBaseIntentService(10980): Releasing wakelock

I really do not know what i did to break this... Any help would be greatly appreciated 我真的不知道我做了什么来打破这个...任何帮助将不胜感激

It had to with a Date Time setting. 它必须具有日期时间设置。 The Date on the tablet was in the past. 平板电脑上的日期是过去的日期。 I think GCM can't sync into the past or something. 我认为GCM无法同步过去。 I reset the Time on the tablet and it works again!! 我在平板电脑上重置了“时间”,它又可以正常工作了!!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM