【问题标题】:Is there a way to read incoming notifications on an android phone from an application?有没有办法从应用程序读取安卓手机上的传入通知?
【发布时间】:2020-04-21 03:04:36
【问题描述】:

当手机收到通知时,它将在java中创建一个名为notification的对象并将其存储在数据库中。我怎样才能使它在应用程序中收到通知时可以读取该通知然后制作对象?

【问题讨论】:

标签: java android android-studio


【解决方案1】:

要访问通知,您可以使用 NotificationListenerService。这方面的文档位于:https://developer.android.com/reference/android/service/notification/NotificationListenerService

对于这个类的实现,已经在这个链接中讨论过:NotificationListenerService Implementation(示例链接见接受的答案)

【讨论】:

  • 谢谢约书亚
  • 没问题。如果您认为可以接受,请不要忘记接受答案。
猜你喜欢
  • 2014-06-25
  • 2016-12-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-07-20
  • 1970-01-01
  • 2012-04-06
  • 1970-01-01
相关资源
最近更新 更多