我已经将android应用程序转换为bb10,在这里可以在bb10中获得推送通知,直到bb10重新启动。如果我重新启动设备,则通知未收到。如果我再次安装该应用程序,则能够收到通知。如果我也重新启动设备,如何获得通知?
我在 android manifest 文件中添加了以下权限
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="com.packagename.permission.C2D_MESSAGE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<receiver
android:name=".GCMBroadcastReceiver" // I have changed this also com.packagename.GCMBroadcastReceiver
android:enabled="true"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.packagename" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
<service android:name=".GCMIntentService" /> //I have changed this also.. <service android:name="com.packagename.GCMIntentService" />
我需要改变什么吗?