sni*_*kst 5 android broadcastreceiver push-notification parse-platform pushbots
从Parse迁移我因为无法覆盖PushBots通知创建代码而陷入困境,就像我以前使用getNotification函数一样ParsePushBroadcastReceiver.我的项目需要多行和单独的推送通知,但PushBots默认行为是按应用程序显示单行和组通知.
我尝试在(事件)的onReceive功能中取消通知,所以我可以创建和显示我自己的推送,但我不知道通知ID并且不起作用(也是一个坏主意).BroadcastReceiverPBConstants.EVENT_MSG_RECEIVECancelAll()
Pushbots.sharedInstance()确实有一个setNotificationBuilder函数,它接受PBGenerate对象,但我不知道如何正确构造它,如果这实际上有助于我的情况.
找不到任何文档并从支持中获得响应,所以在这里询问是否有人知道解决方案或解决此问题的方法.
以下是AndroidManifest.xml中定义接收器的方式
<receiver
android:name="com.pushbots.google.gcm.GCMBroadcastReceiver"
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.my.app" />
</intent-filter>
</receiver>
<receiver android:name="com.my.app.MyPushReceiver" />
<service android:name="com.pushbots.push.GCMIntentService" />
Run Code Online (Sandbox Code Playgroud)
先感谢您!
| 归档时间: |
|
| 查看次数: |
383 次 |
| 最近记录: |