我正在努力管理我的应用在 Android 设备中创建的通知。是否有任何方法可以在任何给定时间向我提供来 self 的应用的 Activity (即仍然在通知抽屉中可见)的通知数量?
最佳答案
您可以使用 NotificationManager
使用 getActiveNotifications()
获取您的应用程序发布的所有 Activity 通知的列表
根据 getActiveNotifications()
的引用文档:
Recover a list of active notifications: ones that have been posted by the calling app that have not yet been dismissed by the user or cancelled by the app.
关于android - 有什么方法可以从我的 Android 应用程序中找出 Activity 通知的数量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30006704/