Gcmbroadcastreceiver Not Fired On Android 4.0.3
I've implemented GCM in my app, following this official tutorial. But my users under Android 4.0.3 reported me notifications are not working. I found out that onReceive from my Gcm
Solution 1:
Is your application's main package name com.nyapp.gcm or com.myapp?
In the permission part of the manifest you use com.myapp.gcm while in the category of the intent filter of the receiver you use com.myapp.
In both places you should you the same package, which is the main package of your app.
Solution 2:
You are missing the action "com.google.android.c2dm.intent.REGISTRATION" in your filter, without which your app will not be able to receive a registration Id. Add the following to your intent-filter:
action android:name="com.google.android.c2dm.intent.REGISTRATION"
Solution 3:
<!-- GCM --><receiverandroid:name="com.google.android.gcm.GCMBroadcastReceiver"android:permission="com.google.android.c2dm.permission.SEND" ><intent-filter><!-- Receives the actual messages. --><actionandroid:name="com.google.android.c2dm.intent.RECEIVE" /><!-- Receives the registration id. --><actionandroid:name="com.google.android.c2dm.intent.REGISTRATION" /><categoryandroid:name="YOUR_APP_PACKAGE_NAME" /></intent-filter></receiver>
Your Manifest file permissions missing check BroadcastReceiver registration in manifest file
Post a Comment for "Gcmbroadcastreceiver Not Fired On Android 4.0.3"