I need to handle with a push notification in two ways:
1) Receive and put a notification on status bar of my android client when app is in background;
2) Receive and handle with a notification without showing it on status bar when my app is in foreground;
For (1) was very simple, I put the and call PushService.setDefaultPushCallback(context, classObject); and the notification appears on status bar correctly.
My problem is with the (2):
- I tried to create a custom BroadCastReceiver, but parse takes the notification before me and shows it on status bar;
- I tried to turn off PushService.setDefaultPushCallback(context, classObject) on onStart method by setting null value for classObject, but when I did that, my receiver was never called and the notification didn´t appear;
Is there anything I could do to intercept notifications before parse or is there another thing I could do to solve my problem?
ps: I need to send the message from the server with "alert"
Tks,