【问题标题】:React Native AppCenter Push - Notifications when app is in backgroundReact Native AppCenter Push - 应用程序在后台时的通知
【发布时间】:2018-01-12 04:11:06
【问题描述】:

我正在使用React Native Microsoft AppCenter,它将Firebase Cloud Messaging 用于Android 应用程序。

  • 当应用打开时,我会收到推送通知,
  • 当应用程序位于后台时,通知仅出现在系统托盘中,但没有实际的Notification

我必须打开托盘才能看到通知。任何帮助将不胜感激

【问题讨论】:

  • 不确定用户界面的外观是什么意思,但这可能是预期的行为。能否提供截图验证?

标签: android react-native visual-studio-app-center


【解决方案1】:

所以最后我确实找到了答案。以防万一这是其他人绊倒的事情......

您需要将“声音”键和“默认”值添加到自定义数据。

"notification_content": {
  "name": "Some Name",
  "title": "Some Title",
  "body": "Some...body",
  "custom_data": { "sound": "default" }
},
"notification_target": {
  "type": "devices_target",
  "devices": ["Some device ID"]
}

【讨论】:

  • 嗨,请帮帮我,我需要从 react natibe 和 appcenter push 发送通知所以你能指导我吗?
  • 有什么问题?
  • 我已经完成了docs.microsoft.com/en-us/appcenter/sdk/push/android 中给出的设置,之后当我从应用中心发送通知时,我就无法进入模拟器。我在谷歌搜索了很多东西。但我没有得到任何东西。只需提供一些对我有帮助的指导或链接。提前致谢
猜你喜欢
  • 2020-07-03
  • 2023-03-04
  • 1970-01-01
  • 1970-01-01
  • 2018-12-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多