[英]I want to handle message when notification received with app not running
In Android APP, I have already use FCM to receive Cloud Message, when the app is foreground , the MyFirebaseMessageService.java
(I defined) runned. 在Android APP中,我已经使用FCM接收Cloud Message,而当应用程序为前台时,运行了
MyFirebaseMessageService.java
(我定义)。 However when the app is background or not running ,The MyFirebaseMessageService.java
doesn't run, I can also receive notification, when I click the notification, Where can I get the cloud message? 但是,当应用程序处于后台运行或未运行时,
MyFirebaseMessageService.java
无法运行,我还可以收到通知,当我单击通知时,在哪里可以获取云消息?
Send your push as data and not as notification, and it will be received always in MyFirebaseMessageService onMessageReceived. 将推送作为数据而不是作为通知发送,它将始终在MyFirebaseMessageService onMessageReceived中接收。
https://firebase.google.com/docs/cloud-messaging/concept-options https://firebase.google.com/docs/cloud-messaging/concept-options
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.