Does exist a different way to send a push without show default notification (from Parse library)?
I've created a custom BroadcastReceiver to show notification with full message, but if I send json with "alert" parameter, the default notification is shown by Parse library.
For example:
{ "alert": "Both notifications will be shown", "url": "www.parse.com", "action" : "com.myapp.package.UPDATE_STATUS" }
and
{ "message": "Custom notification will be shown", "url": "www.parse.com", "action" : "com.myapp.package.UPDATE_STATUS" }
The first json shows default notification, because Parse library intercepts the "alert" parameter. The seconds json shows just my custom notification.
The second json would be perfect, but I send push notifications to iOS app too. So, I want to have the same json for Android and iOS. I want to send just one push.
Is it possible to use "alert" parameter and show only custom notification?
Thank you!! Regards
Yes, replace :
PushService.setDefaultPushCallback(this, YourActivity.class);
to :
PushService.startServiceIfRequired(this);
Parse BroadcastReceiver no longer receive notifications.
https://www.parse.com/questions/how-suppress-push-notification-from-being-displayed
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments