更新时间:2022-12-27 10:37:39
当您的应用程序在后台使用 data
时,只能处理 onMessageReceived
中的消息> 只有有效载荷.
It is only possible to handle the message in onMessageReceived
when your app is in background when using a data
only payload.
在您的负载中同时使用 notification
和 data
时,预期的行为是 Android 系统将在应用程序处于后台时处理通知,无论是什么priority
的价值.
When using both notification
and data
in your payload, the expected behavior is that the Android System will handle the notification when the app is in background, regardless of what is the value of your priority
.
有关更多信息,请参阅关于处理 Android 消息的官方文档详情.
See the official docs on Handling Android Messages for more details.