【问题标题】:Recognize when a notification posted / removed is in a group识别发布/删除的通知何时在组中
【发布时间】:2015-10-30 22:10:18
【问题描述】:

我正在尝试使用 NotificationListenerService 检查 StatusBarNotifications(显示在 StatusBar 中)是否是组固有的(例如邮件或消息)。我正在使用 SDK >= 21。

在使用 fb、whatsapp 或 gmail 等知名应用程序时,我看到了用于标记分组消息的不同规则(StatusBarNotification 的组和关键属性 - 为此目的管理起来并不容易)。

如何识别发布/删除的通知何时在组中?哪个是组头?

【问题讨论】:

    标签: android android-notifications android-statusbar


    【解决方案1】:

    仅使用 StatusBarNotification 无法实现此目的。但是可以使用 onNotificationRemoved/Posted 和 getActiveNotifications 做一些事情。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-19
      • 2021-04-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多