Android的 - 没有默认的通知 - Parse.com显示自定义通知 [英] Android - Show Custom Notification without default notification- Parse.com

查看:175
本文介绍了Android的 - 没有默认的通知 - Parse.com显示自定义通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

确实存在不同的方式来发送,而不显示默认通知推送(从解析库)?

Does exist a different way to send a push without show default notification (from Parse library)?

我创建了一个自定义的广播接收器以显示与完整的邮件通知,但如果我送JSON与警报参数,默认通知被解析库中。

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.

例如:

{提醒:两个通知都会显示,URL:www.parse.com,动作:com.myapp.package.UPDATE_STATUS}

{ "alert": "Both notifications will be shown", "url": "www.parse.com", "action" : "com.myapp.package.UPDATE_STATUS" }

{消息:自定义通知将显示,URL:www.parse.com,动作:com.myapp.package.UPDATE_STATUS}

{ "message": "Custom notification will be shown", "url": "www.parse.com", "action" : "com.myapp.package.UPDATE_STATUS" }

第一个JSON显示默认的通知,因为解析库截获了警报参数。秒JSON只显示我的自定义通知。

The first json shows default notification, because Parse library intercepts the "alert" parameter. The seconds json shows just my custom notification.

第二JSON将是完美的,但我发送推送通知iOS应用了。所以,我想为Android和iOS一样JSON。我想给刚一推。

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

推荐答案

是,替换:

PushService.setDefaultPushCallback(this, YourActivity.class);

PushService.startServiceIfRequired(this);

解析广播接收器不再接收通知。

Parse BroadcastReceiver no longer receive notifications.

https://www.parse.com/questions/how-sup$p$pss-push-notification-from-being-displayed

这篇关于Android的 - 没有默认的通知 - Parse.com显示自定义通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆