google-cloud-messaging Differences between sending to Android and iOS devices Make device receive notification even when sleeping

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

When sending a notification to an iOS device, you must set priority: "high" for it to wake up. Otherwise, the notification will not be received while the phone is asleep.

Sets the priority of the message. Valid values are "normal" and "high." On iOS, these correspond to APNs priorities 5 and 10.

By default, messages are sent with normal priority. Normal priority optimizes the client app's battery consumption and should be used unless immediate delivery is required. For messages with normal priority, the app may receive the message with unspecified delay.

When a message is sent with high priority, it is sent immediately, and the app can wake a sleeping device and open a network connection to your server.

--- FCM Server Reference



Got any google-cloud-messaging Question?