【发布时间】:2014-02-03 10:20:28
【问题描述】:
首先,执行此操作(在运行 4.4.2 的 Nexus 5 上测试):
- 将 PRIORITY_LOW 通知传递给 Service.startForeground()。
- 状态栏中不显示观察通知。
- 使用相同的通知 ID 引发 PRIORITY_MAX 通知。
- 观察通知显示在状态栏中。
现在,有没有办法从状态栏中删除该图标(Service.stopForeground() 除外)?
我试过调用 NotificationManager.cancel() 和 NotificationManager.cancelAll()。并且还尝试提出相同的原始 PRIORITY_LOW 通知。但是它们都在状态栏中留下了通知图标。
【问题讨论】:
标签: android android-notifications android-notification-bar