如何在状态栏清除推送通知提醒 - 机器人 [英] How to clear Push notification alert on status bar - android

查看:132
本文介绍了如何在状态栏清除推送通知提醒 - 机器人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我已经使用的解析在我的Andr​​oid应用程序推送通知。

Hi i've used parse push notification in my android app.

我不使用noraml通知。我已经注册解析推送通知。通知警报来自服务器

i'm not using noraml notification. i've register parse push notification. The notification alert comes from server

设备成功接收到推送通知。

device received the push notification successfully.

例如我收到通知10从服务器,如果我在我的设备上打开一个通知,应用程序已经打开,一个通知已被删除。

for example i've received 10 notification from server, if i open one notification on my device, the app has opened and the one notification has deleted.

我的问题是,

如何清除状态栏其他9推送通知提醒,当打开一个通知。

推荐答案

是否android.app.NotificationManager.cancelAll()不工作?

Does android.app.NotificationManager.cancelAll() not work?

如果你需要做的东西很习惯,你可以使用ParsePush推出的意图,而不是创建一个通知。然后,您可以使用一个BroadcastReceiver创建具有不规范的行为通知(即选择性堆放,关闭所有当一个人与互动,等等)。

If you need to do something very custom, you can use ParsePush to launch an Intent rather than creating a Notification. You can then use a BroadcastReceiver to create Notifications with non-standard behavior (i.e. selective stacking, dismiss all when one is interacted with, etc).

这篇关于如何在状态栏清除推送通知提醒 - 机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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