Provides access to remote notifications (also known as push notifications) and local notifications (scheduling and immediate) related functions.
Exponent.Notifications.addListener(listener)
An EventSubscription object that you can call remove() on when you would like to unsubscribe the listener.
EventSubscription
Returned from addListener
.
remove() (function) — Unsubscribe the listener from future notifications.
Notification
An object that is passed into each event listener when a notification is received:
selected
or received
. selected
if the notification was tapped on by the user, received
if the notification was received while the user was in the app.true
if the notification is a push notification, false
if it is a local notification.Exponent.Notifications.getExponentPushTokenAsync()
Returns a Promise that resolves to a token string. This token can be provided to the Exponent notifications backend to send a push notification to this device. Read more in the Push Notifications guide.
Exponent.Notifications.presentLocalNotificationAsync(localNotification)
Trigger a local notification immediately.
A Promise that resolves to a unique notification id.
Exponent.Notifications.scheduleLocalNotificationAsync(localNotification, schedulingOptions)
Schedule a local notification to fire at some specific time in the future or at a given interval.
localNotification (object) —
An object with the properties described in LocalNotification.
schedulingOptions (object) —
An object that describes when the notification should fire.
(new Date()).getTime() + 1000
is one second from now.'minute'
, 'hour'
, 'day'
, 'week'
, 'month'
, or 'year'
.A Promise that resolves to a unique notification id.
Exponent.Notifications.dismissNotificationAsync(localNotificationId)
Android only. Dismisses the notification with the given id.
scheduleLocalNotificationAsync
or presentLocalNotificationAsync
.Exponent.Notifications.dismissAllNotificationsAsync()
Android only. Clears any notificatons that have been presented by the app.
Exponent.Notifications.cancelScheduledNotificationAsync(localNotificationId)
Cancels the scheduled notification corresponding to the given id.
scheduleLocalNotificationAsync
or presentLocalNotificationAsync
.Exponent.Notifications.cancelAllScheduledNotificationsAsync()
Cancel all scheduled notifications.
LocalNotification
An object used to describe the local notification that you would like to present or schedule.
selected
or received
. selected
if the notification was tapped on by the user, received
if the notification was received while the user was in the app.ios (optional) (object) — notification configuration specific to iOS.
true
, play a sound. Default: false
.android (optional) (object) — notification configuration specific to Android.
© Copyright 2025, Exponent. Created using Gatsby.