In Android APP, I have already use FCM to receive Cloud Message, when the app is foreground , the MyFirebaseMessageService.java
(I defined) runned. 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?
Send your push as data and not as notification, and it will be received always in MyFirebaseMessageService onMessageReceived.
https://firebase.google.com/docs/cloud-messaging/concept-options
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.