Я использую react-native-gcm-android
и react-native-system-notification
пакеты для управления уведомлениями GCM (Android), все работает отлично на Android 4.x, но на 5.0 (ASUS_Z00AD) после перезагрузки. Сообщения GCM не отображаются, журнал показывает мнеПриложение не получает сообщений GCM после перезагрузки на Android 5.0
W/BroadcastQueue( 639): Reject to launch app com.Sgoomys.Main/10246 for broadcast: App Op 48
W/GCM-DMM (1824): broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE flg=0x10000000 pkg=com.Sgoomys.Main (has extras) }
В AndroidManifest.xml
все настройки сделаны в соответствии с документацией пакеты:
<permission
android:name="com.Sgoomys.Main.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.Sgoomys.Main.permission.C2D_MESSAGE" />
...
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.Sgoomys.Main" />
</intent-filter>
</receiver>
<service android:name="com.oney.gcm.GcmRegistrationService"/>
<service android:name="com.oney.gcm.BackgroundService"></service>
<service
android:name="io.neson.react.notification.GCMNotificationListenerService"
android:exported="false" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<receiver
android:exported="false"
android:name="com.oney.gcm.GcmBroadcastReceiver">
<intent-filter>
<action android:name="com.oney.gcm.GCMReceiveNotification" />
</intent-filter>
</receiver>
Google Play библиотека Услуги является com.google.android.gms:play-services-gcm:8.4.0