5

migrating from Parse I got stuck by not being able to override PushBots notification creation code like I used to do with getNotification function in ParsePushBroadcastReceiver. My project needs multiline and separate push notifications, but PushBots default behavior is to show single line and group notifications by application.

I tried canceling notification in the onReceive function of BroadcastReceiver (PBConstants.EVENT_MSG_RECEIVE event), so I could create & display my own push, but I don't know notification ID and CancelAll() didn't work (also would be a bad idea).

Pushbots.sharedInstance() does have a setNotificationBuilder function, which accepts PBGenerate object, but I have no idea how to construct it properly and if this actually would help my case.

Couldn't find any documentation & get a response from support yet, so asking here if maybe someone knows a solution or a way to workaround this issue.

Here's how receivers are defined in 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" />

Thank you in advance!

sniurkst
  • 7,212
  • 5
  • 30
  • 30
  • It sounds like you basically just want to capture the push messages and build your own custom notifications. In that case, you'd need to do the entire setup yourself. You need to set up GCM in your app: https://developers.google.com/cloud-messaging/android/client And then build the notifications: http://developer.android.com/guide/topics/ui/notifiers/notifications.html and http://developer.android.com/training/notify-user/build-notification.html – kevinpelgrims Mar 13 '16 at 10:40
  • @sniurkst Did you find a solution ? – Anirudh Apr 16 '16 at 14:11

0 Answers0