notifications - GcmBroadcastReceiver not fired on Android 4.0.3 -
i've implemented gcm in app, following official tutorial. users under android 4.0.3 reported me notifications not working. found out onreceive
gcmbroadcastreceiver extends broadcastreceiver
wasn't fired. here manifest.
<!-- gcm --> <uses-permission android:name="android.permission.get_accounts" /> <uses-permission android:name="com.google.android.c2dm.permission.receive" /> <uses-permission android:name="android.permission.vibrate" /> <permission android:name="com.myapp.gcm.permission.c2d_message" android:protectionlevel="signature" /> <uses-permission android:name="com.myapp.gcm.permission.c2d_message" /> <application ... > <!-- gcm --> <receiver android:name="com.myapp.gcmbroadcastreceiver" android:permission="com.google.android.c2dm.permission.send" > <intent-filter> <action android:name="com.google.android.c2dm.intent.receive" /> <category android:name="com.myapp" /> </intent-filter> </receiver>
what doing wrong?
is application's main package name com.nyapp.gcm or com.myapp?
in permission part of manifest use com.myapp.gcm while in category of intent filter of receiver use com.myapp.
in both places should same package, main package of app.
Comments
Post a Comment