【问题标题】:How to get all notifications with react-native-push-notification on Android, equivalent to PushNotificationIOS getDeliveredNotifications?如何在Android上用react-native-push-notification获取所有通知,相当于PushNotificationIOS getDeliveredNotifications?
【发布时间】:2018-03-28 02:16:50
【问题描述】:

当应用程序处于后台或关闭时,收到的推送通知会转到顶部栏(通知中心)。
稍后点击一个通知将打开应用程序并为该特定消息调用 onNotification 回调。 在 iOS 中,getDelievedNotifications 返回一个包含所有待处理通知的数组。
如何在Android中做到这一点?

谢谢。

(已编辑:我正在使用https://github.com/zo0r/react-native-push-notification

【问题讨论】:

  • 你有没有设法解决这个问题?

标签: android react-native notifications google-cloud-messaging react-native-push-notification


【解决方案1】:

你可以使用这个库 - https://github.com/zo0r/react-native-push-notification

奇怪的是,这个库支持 Android 上的重复通知,而 react-native 基础库支持 IOS 设备上的重复通知。

【讨论】:

  • 我现在在两个平台上都使用这个库。但是,我无法从他们的 README 中找到有关如何在 Android 中获取所有通知的解释。您是否知道任何资源或示例代码?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2018-12-29
  • 2021-07-04
  • 1970-01-01
  • 1970-01-01
  • 2020-07-03
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多