gpt4 book ai didi

android - 在用户不点击通知的情况下处理数据负载?

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:14:15 26 4
gpt4 key购买 nike

When in the background, apps receive the notification payload in the notification tray, and only handle the data payload when the user taps on the notification.

有没有办法在用户不点击通知的情况下处理数据负载?

最佳答案

基于 Handling Messages 上的 FCM 文档:

App state   Notification        Data                Both
Foreground onMessageReceived onMessageReceived onMessageReceived
Background System tray onMessageReceived Notification: system tray
Data: in extras of the intent.

它不是仅通过点击通知来专门处理的。您可以在 onMessageReceived() 中处理它。可以肯定的是,点击操作还取决于您如何实现它。

如果您打算让它执行其他操作,请提供更多详细信息。

关于android - 在用户不点击通知的情况下处理数据负载?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39766418/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com