2016-06-13 110 views
1

我使用react-native-gcm-androidreact-native-system-notification包来管理GCM通知(Android),一切正常,但在5.0(ASUS_Z00AD)上重新启动GCM消息后,显示我应用程序在Android 5.0上重新启动后不会收到GCM消息

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> 

谷歌Play服务库是com.google.android.gms:play-services-gcm:8.4.0

回答

0

我终于解决了这个难题...

应用,因为它阻断华硕实用程序“自动启动管理器”并不在启动时开始 - 所有新近安装的应用程序默认情况下阻止。

所以,现在我将添加一个支票com.asus.mobilemanager包警报和按钮启动此实用程序,并解除自动运行的,但我认为正确的方法将检测所有可能拦截软件,并告知用户它。

相关问题