Reliability and speed of push notifications

Please provide the following:

  1. SDK Version: 38
  2. Platforms(Android/iOS/web/all): Mostly Android

This is a hard one to reproduce, as it’s an issue of flakiness - but I’m finding expo notifications somewhat flaky and unreliable.

So far I think it’s only Android, as customers reporting the issue that I’ve been able to follow up with are on Android, but I’m not able to rule out iOS at the moment.

We set up a channel called ‘default’ on Android

if (allowNotification && Platform.OS === 'android') {
      Notifications.createChannelAndroidAsync('default', {
        name: 'default',
        sound: true,
        priority: 'max',
        vibrate: true,
        badge: true,
      })

When we send notifications we’re generally sending less than 1000. We use the chunkPushNotifications method from the sdk, we wait for receipts and check the response.

The notification that we send looks like

{
      title: "Lorem",
      body: "Lorem ipsum",
      sound: 'default',
      to: expoToken,
      channelId: 'default',
      data: {
        id: "meaningful id",
        createdDateTime: "datetime",
        image: "ic_stat_warn",
        title: "Lorem",
        body: {
          plain: "Lorem ipsum",
        },
      }

We send notifications and check the receipts.

We send to about ~3000 notifications at a time. We have customers complaining that they aren’t receiving notifications. I also have a test Android device that I’ve set up to send a test push notification hourly on the hour, and I plan to add an iOS device as well. In the few days I’ve been running it I’ve received a mix of notifications that came within a few minutes, notifications that came up to half an hour late and notifications that didn’t arrive at all.

Our business model relies on these notifications arriving in a timely manner. Is there anything we can do to understand why these notifications are unreliable?

you can set priority to “high” when sending notifications: https://github.com/expo/expo/issues/10456#issuecomment-724907761

Right. My understanding was that priority is set by the channel, not the priority of the notification on Android 8 or above https://developer.android.com/guide/topics/ui/notifiers/notifications#importance

But I’ll add this in and see if it makes a difference to reliability on our test devices

there are priorities on the notification payload themselves and then priorities on the device for a notification channel. i don’t totally understand why this is (i am not very familiar with fcm and android notifications api and don’t maintain expo-notifications) but there probably is a good reason, even though it’s confusing!

Just for anyone else coming across this, setting the priority on the notification seems to have greatly increased reliability. I am continuing to collect data and will post again if it changes, but preliminary results are reassuring