Notification questions

some questions regarding notifications. some of these might be dumb because i’m still new to react native and mobile dev in general.

  1. If I look at the source code a Notification object looks like below. What does isMultiple mean?
type Notification = {
  origin: 'selected' | 'received',
  data: any,
  remote: boolean,
  isMultiple: boolean,
};
  1. Is there documentation regarding acceptable use/terms of using the expo API for sending push notifications to devices?

  2. Is there documentation describing how expo attempts to retry sending of push notifications?

  3. What is the TTL of a queued push notification. e.g. if I send a hundred push notifications but the target device isn’t turned on, how long before notifications start to expire? or is there a maximum number that can be queued at one time?

  4. If a local notification is scheduled for sometime in the future, but the app is not running, (e.g. force stop on android) will the notification still appear?

@ide do you know the answers to these questions?

Hi @wexpo:

  1. isMultiple refers to whether the notifications were collapsed together, which happens if there is more than one collapsible notification.

  2. The Expo community guidelines touch upon our content policy here:

Our Standards for Content Hosted by Expo

In addition to providing an environment for developers to learn, collaborate, and share with each other, Expo also provides a service for hosting your projects. We apply a slightly different set of standards to projects hosted on our service. At a minimum, your projects should respect:

Apple’s “Safety” and “Intellectual Property” criteria from the App Store Review Guidelines

Google’s “Restricted Content” and “Intellectual Property, Deception, and Spam” criteria from the Play Store Developer Content Policy

  1. Expo doesn’t retry delivering notifications. That is delegated to GCM (Android) and APNs (iOS). When you send a notification through Expo, you get back either a success status or error status. If you get back a success status, that means Google or Apple has received the notification and will apply whatever delivery and retry policies they have implemented. If you get back an error status, Expo will not retry on your behalf. This begets simplicity and statelessness.

  2. Similar to retries, the TTL policy is delegated to Google and Apple. Expo supports a TTL field for iOS notifications.

  3. Yes, local notifications are scheduled with the OS, as opposed to the app process. So even if the app process stops, the OS will display the notification at the scheduled time.

1 Like

Hi @ide and everyone,
so is there any solution if the device is offline?
How can we retry to push notifications when the device is online again?

Thanks in advance