简体   繁体   中英

Does android system blocks FCM notification

I am sending a data notification every 2 min for the device in order to collect data (GPS, Signal strength ...).

The FCM trigger service that sends the collected data to an API

However, The device stops receive FCM notification to starts that app in some cases or even till restart it.

Is there any reason for this and how Can I pass it?

Note: I have Add server up to white list in the firebase console

Generally there are two types of FCM messages we can send to registered devices. First one is data message and the other one is notification message. The default priority of data message is NORMAL where as the notification messages have a HIGH priority. Messages with HIGH priority are considered to be delivered first (That means there is a chance of not receiving data messages in some case). But it is possible to change the priority of data message to HIGH while sending them from server. https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message

But in my case i had some situations when i was not able to receive FCM messages even after setting priority to HIGH. Thus i opted to use FCM wrapper services like Onesignal to send push notification. It is way better in case of message delivery. Inside it is FCM, but they handled the message delivery problem up to an extent. Take a look at https://onesignal.com/

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM