在我的应用程序中,我使用GCM。两台设备在GCM服务器中成功注册。当我向设备发送通知时。一个设备收到通知而另一个设备没有收到通知
我可以从GCM服务器获得成功。
MulticastResult(multicast_id=5801304151550412167,total=2,success=2,failure=0,canonical_ids=0,results: [[ messageId=0:1401798089476787%e15813d800000031 ], [ messageId=0:1401798089477704%e15813d800000031 ]]
的Manifest.xml
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<permission
android:name="com.mothersgroupie.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="com.mothersgroupie.permission.C2D_MESSAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<receiver
android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.mothersgroupie" />
</intent-filter>
</receiver>
<service android:name="com.mothersgroupie.GCMIntentService" />
答案 0 :(得分:0)
要检查设备的一些问题:
1_安装了Google Play吗?
2_是否拥有有效的Google帐户并已登录?
3_有互联网连接吗?
4_其他通知,就像gmail一样?