Api 2.3 Googlecloudmessaging Get Only Registration Event
The code is very simple and perfectly works on API >= 3.0, but if I started at API 2.3 I'm getting the problem - Google send only registration events: protected void onHandleInt
Solution 1:
Your manifest has many inconsistencies :
package="com.fenix14"
<permission android:name="com.fenix14.utils.permission.C2D_MESSAGE"android:protectionLevel="signature" />
<uses-permissionandroid:name="com.fenix14.utils.permission.C2D_MESSAGE" /><receiverandroid:name="com.fenix14.gcm.GcmBroadcastReceiver"android:permission="com.google.android.c2dm.permission.SEND"><intent-filter><actionandroid:name="com.google.android.c2dm.intent.RECEIVE" /><actionandroid:name="com.google.android.c2dm.intent.REGISTRATION" /><categoryandroid:name="com.fenix14.gcm" /></intent-filter></receiver>
You should use the same package name in all the GCM relevant places, so it should be :
package="com.fenix14"
<permission android:name="com.fenix14.permission.C2D_MESSAGE"android:protectionLevel="signature" />
<uses-permissionandroid:name="com.fenix14.permission.C2D_MESSAGE" /><receiverandroid:name="com.fenix14.gcm.GcmBroadcastReceiver"android:permission="com.google.android.c2dm.permission.SEND"><intent-filter><actionandroid:name="com.google.android.c2dm.intent.RECEIVE" /><actionandroid:name="com.google.android.c2dm.intent.REGISTRATION" /><categoryandroid:name="com.fenix14" /></intent-filter></receiver>
Post a Comment for "Api 2.3 Googlecloudmessaging Get Only Registration Event"