Android PushWoosh-添加自定义广播接收器
我想要实现的是:在收到PushWoosh通知后,检查有效负载并相应地将用户引导到特定活动 我正在遵循一个关于 在Android中使用自定义推送广播接收器 但是,我无法在自定义推送中接收任何推送 以下是Android PushWoosh-添加自定义广播接收器,android,pushwoosh,Android,Pushwoosh,我想要实现的是:在收到PushWoosh通知后,检查有效负载并相应地将用户引导到特定活动 我正在遵循一个关于 在Android中使用自定义推送广播接收器 但是,我无法在自定义推送中接收任何推送 以下是AndroidManifest.xml: <receiver android:name="com.google.android.gcm.GCMBroadcastReceiver" android:exported="true"
AndroidManifest.xml
:
<receiver
android:name="com.google.android.gcm.GCMBroadcastReceiver"
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="${applicationId}" />
</intent-filter>
</receiver>
<receiver android:name=".receivers.PWBroadcastReceiver">
<intent-filter>
<action android:name="${applicationId}.com.arellomobile.android.push.REGISTER_BROAD_CAST_ACTION"/>
</intent-filter>
</receiver>
<service android:name="com.arellomobile.android.push.PushGCMIntentService" />
<receiver android:name=".receivers.PWBroadcastReceiver" />
<meta-data android:name="PW_NOTIFICATION_RECEIVER" android:value=".receivers.PWBroadcastReceiver"/>
更新:
请注意,PW_NOTIFICATION_RECEIVER
expectpackage+[NOTIFICATION RECEIVER类的路径]
。。如果您使用的应用程序id(com.myapp.staging)与原始包名(com.myapp)不同,则可能会导致问题。。修复方法是使用原始包而不是应用程序id
<receiver android:name=".receivers.PWBroadcastReceiver" />
<meta-data android:name="PW_NOTIFICATION_RECEIVER" android:value=".receivers.PWBroadcastReceiver"/>
更新:
请注意,PW_NOTIFICATION_RECEIVER
expectpackage+[NOTIFICATION RECEIVER类的路径]
。。如果您使用的应用程序id(com.myapp.staging)与原始包名(com.myapp)不同,则可能会导致问题。。修复方法是使用原始包而不是应用程序id