覆盖BroadcastReceiver(PushBots)中的推送通知?

时间:2016-03-04 15:31:17

标签: android parse-platform push-notification broadcastreceiver pushbots

Parse 迁移我因为无法覆盖 PushBots 通知创建代码而陷入困境,就像我在getNotification中使用ParsePushBroadcastReceiver函数一样}。我的项目需要多行和单独的推送通知,但 PushBots 默认行为是按应用程序显示单行和组通知。

我尝试在onReceive BroadcastReceiver PBConstants.EVENT_MSG_RECEIVE事件的CancelAll()函数中取消通知,因此我可以创建&显示我自己的推送,但我不知道通知ID,Pushbots.sharedInstance()不起作用(也是一个坏主意)。

setNotificationBuilder确实有PBGenerate函数,它接受 <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" /> 个对象,但我不知道如何正确构造它,如果这实际上对我的情况有帮助。

无法找到任何文档&amp;得到支持的回复,所以问这里是否有人知道解决方案或解决这个问题的方法。

以下是AndroidManifest.xml中定义接收器的方法

int arr[] = {};

提前谢谢!

0 个答案:

没有答案