- Updated
@expo/config-plugins
from4.0.2
to4.0.14
and@expo/image-utils
from^0.3.16
to^0.3.18
(#15621 by @EvanBacon)
This version does not introduce any user-facing changes.
- Update JS code to read manifest2 when manifest is not available. (#13602 by @wschurman)
- Add usePermissions hook from modules factory. (#13863 by @bycedric)
- Fixed Android notifications not respecting the
shouldPlaySound
property insetNotificationHandler
. (#13411 by @cruzach) - Force device ID to lowercase before sending to Expo's servers. (Only applicable if you're using
ExpoPushToken
s). (#13409 by @cruzach) - Fixed plugin to not throw if the notification icon isn't set, and there's no notification icon present in the Android project. (#13539 by @cruzach)
- Fix building errors from use_frameworks! in Podfile. (#14523 by @kudo)
- Updated
@expo/config-plugins
,@expo/image-utils
(#14443 by @EvanBacon)
- [plugin] Refactor imports (#13029 by @EvanBacon)
- Add support for custom notification sounds when using EAS Build. (#12782 by @cruzach)
- Added ability to respond to remote notifications received while the app is backgrounded. (#13130 by @cruzach)
- Enable kotlin in all modules. (#12716 by @wschurman)
- Add new manifest2 field and make existing field optional. (#12817 by @wschurman)
- Use originalFullName instead of currentFullName (#12953) by @wschurman)
- Migrated from
unimodules-permissions-interface
toexpo-modules-core
. (#12961 by @tsapeta) - Refactored uuid imports to v7 style. (#13037 by @giautm)
This version does not introduce any user-facing changes.
- Add bare workflow support to
getExpoPushTokenAsync
. (#12465 by @EvanBacon)
This version does not introduce any user-facing changes.
- Fixed an issue on Android where dismissing notifications by ID inside of Expo Go did nothing. ([#12306](#12306 by @cruzach)
- Expose
getLastNotificationResponseAsync
method (non-hook version ofuseLastNotificationResponse
).
- Prevent scoped category IDs from being returned from
setNotificationCategoryAsync
. ([#12212](#12212 by @cruzach)
- Allow for remote notifications to overwrite notifications already existing in the tray. (#12050 and #12055 by @cruzach)
- Notifications from different experiences in Expo Go can no longer overwrite each other. (#12050 and #12055 by @cruzach)
- Updated Android build configuration to target Android 11 (added support for Android SDK 30). (#11647 by @bbarthec)
- Added
YearlyTriggerInput
that allows scheduling a yearly recurring notification for a specific day of the year, hour and minute. It is supported on both iOS and Android. (#11898 by @raulmt)
- Notification categories will no longer be lost after ejecting to the bare workflow (if ejecting after SDK 41). (#11651 by @cruzach)
- Notify all listeners of pending notification responses. (#11536 by @esamelson)
- The package is now shipped with prebuilt binaries on iOS. You can read more about it on expo.fyi/prebuilt-modules. (#11224 by @tsapeta)
- Dropped support for iOS 10.0 (#11344 by @tsapeta)
- When migrating installation identifier (used internally to fetch Expo push token)
expo-notifications
will now remove existingSharedPreferences
entry, if the migrated identifier comes from there. This may cause issues in bare workflow projects ifexpo-constants
is installed in version lower than10.0.0
. Please upgradeexpo-constants
in your project to at least10.0.0
when installing new versions ofexpo-notifications
. If you do not upgradeexpo-constants
, its.installationId
may change. (#11283 by @sjchmiela)
- Created config plugin. (#11633 by @EvanBacon)
- Fixed a case where
requestPermissionsAsync
would ignore the providedNotificationPermissionsRequest
. (#11548 by @cruzach) - Fixed case on Android where
getPermissionsAsync
would always returncanAskAgain: true
. (#11551 by @cruzach) - Fixed migration process to not use
expo-constants
installation ID if there is a notifications-specific identifier. (#11287 by @sjchmiela) - Native iOS notifications emitter module no longer registers for notification events as soon as module registry is ready which fixes initial notification response not being delivered to JS in standalone (Expo managed workflow) iOS apps. (#11382 by @sjchmiela)
- Changed the visibility of Android's
InstallationId#getNonBackedUpUuidFile
method so it's easier to override by custom implementations. (#11249 by @sjchmiela) - Added extra check for marking pending notification responses as delivered which prevents legacy Expo notifications to consume notification responses when we don't want it to which should help fix initial notification response (causing the application to start) not being delivered (only in iOS standalone applications in Expo managed workflow). (#11378 by @sjchmiela)
- Removed
fbjs
dependency (#11396 by @cruzach)
This version does not introduce any user-facing changes.
-
Changed the way
PermissionResponse.status
is calculated on iOS. Previously, it returns the numeric value ofUMPermissionStatus
which does not match the TypeScript enum declaration. (#10513 by @cHaLkdusT) -
Changed the way
NotificationContent.data
is calculated on iOS. Previously it was the contents of remote notification payload with all entries from under"body"
moved from under"body"
to root level. Now it's the sole unchanged contents ofpayload["body"]
. Other fields of the payload can now be accessed on iOS throughPushNotificationTrigger.payload
(similarly to how other fields of native remote message can be accessed on Android underPushNotificationTrigger.remoteMessage
). (#10453 by @sjchmiela) -
Changed class responsible for handling Firebase events from
FirebaseMessagingService
to.service.NotificationsService
on Android. (#10558 by @sjchmiela)Note that this change most probably will not affect you — it only affects projects that override
FirebaseMessagingService
to implement some custom handling logic. -
Changed how you can override ways in which a notification is reinterpreted from a
StatusBarNotification
and in which aNotification
is built from defining anexpo.modules.notifications#NotificationsScoper
meta-data value inAndroidManifest.xml
to implementing aBroadcastReceiver
subclassingNotificationsService
delegating those responsibilities to your customPresentationDelegate
instance. (#10558 by @sjchmiela)Note that this change most probably will not affect you — it only affects projects that override those methods to implement some custom handling logic.
-
Removed
removeAllNotificationListeners
method. You can (and should) still remove listeners usingremove
method onSubscription
objects returned byaddNotification…Listener
. (#10883 by @sjchmiela) -
Fixed device identifier being used to fetch Expo push token being backed up on Android which resulted in multiple devices having the same
deviceId
(and eventually, Expo push token). (#11005 by @sjchmiela) -
Fixed device identifier used when fetching Expo push token being different than
Constants.installationId
in managed workflow apps which resulted in different Expo push tokens returned for the same experience across old and new Expo API and the device push token not being automatically updated on Expo push servers which lead to Expo push tokens corresponding to outdated Firebase tokens. (#11005 by @sjchmiela) -
Removed
removeAllPushTokenListeners
method. You can (and should) still remove listeners usingremove
method onSubscription
objects returned byaddPushTokenListener
. (#11106 by @sjchmiela)
- Added
useLastNotificationResponse
React hook that always returns the notification response that has been emitted most recently. (#10883 by @sjchmiela) - Added
WeeklyTriggerInput
that allows scheduling a weekly recurring notification for a specific day of week, hour and minute. It is supported on both iOS and Android. (#9973 by @RikTheunis) - Added
getNextTriggerDateAsync
method allowing you to verify manually when would the next trigger date for a particular notification trigger be. (#10455 by @sjchmiela) - Added support for restoring scheduled notifications alarms on Android after an app is updated. (#10708 by @sjchmiela)
- Added support for auto server reregistration for Expo push tokens (keeping Expo push token always valid) and auto server registration customizations. (#10908 by @sjchmiela)
- Fixed TypeScript definition:
setNotificationCategoryAsync
should expectoptions.allowAnnouncement
, notoptions.allowAnnouncment
. (#11025 by @cruzach) - Fixed issue where custom notification icon and color weren't being properly applied in Android managed workflow apps. (#10828 by @cruzach)
- Fixed case where Android managed workflow apps could crash when receiving an interactive notification. (#10608 by @cruzach)
- Fixed case where Android apps could crash if you set a new category with a text input action without providing any
options
. (#10141 by @cruzach) - Android apps no longer rely on the
submitButtonTitle
property as the action button title (they rely onbuttonTitle
, which matches iOS behavior). (#10141 by @cruzach) - Fixed
Notifications.requestPermissions()
returningundetermined
instead of a known status in some browsers. (#10296 by @sjchmiela) - Fixed crashing when Proguard is enabled. (#10421 by @lukmccall)
- Fixed the application icon being always added as a notification icon. (#10471 by @lukmccall)
- Fixed faulty trigger detection mechanism which caused some triggers with
channelId
specified get recognized as triggers of other types. (#10454 by @sjchmiela) - Fixed fatal exception sometimes being thrown when notification was received or tapped on Android due to observer being cleared before it's added. (#10640 by @sjchmiela)
- Removed the large icon from managed workflow. (#10492 by @lukmccall)
- Fixed crash happening due to non-existent
ExpoNotificationsService
being declared inAndroidManifest.xml
. (#10638 by @sjchmiela) - Fixed notifications not playing any sound when
shouldShowAlert: false
butshouldPlaySound: true
insetNotificationHandler
. (#10699 by @cruzach) - Add guard against badgin usage in SSR environments. (#10741 by @bycedric)
- Moved notification events handling from main thread to a background thread which makes users' devices more responsive. (#10762 by @sjchmiela)
- Fixed having to define
CATEGORY_DEFAULT
on anActivity
that is expected to receiveexpo.modules.notifications.OPEN_APP_ACTION
intent when handling notification response. (#10755 by @sjchmiela) - Fixed notifications not being returned at all from
getAllPresentedNotificationsAsync()
if the library fails to reconstruct notification request based on marshaled copy in notification data. From now on they'll be naively reconstructed from the Android notification. (#10801 by @sjchmiela) - May have helped fix an issue where "initial notification response" (the one that opened the app) was not being delivered to Android apps. (#10773 by @sjchmiela)
This version does not introduce any user-facing changes.
- Added permissions support for web. (#9576 by @EvanBacon)
- Fix scheduled notifications not being displayed after five minutes of phone inactivity on Android. (#9816 by @sjchmiela)
- Fixed case where iOS notification category would not be set on the very first call to
setNotificationCategoryAsync
. (#9515 by @cruzach) - Fixed notification response listener not triggering in the managed workflow on iOS when app was completely killed (#9478 by @cruzach)
- Fixed notifications being displayed when
shouldShowAlert
wasfalse
on Android. (#9563 by @barthap) - Fixed
Application Not Responding
occurring in the Google Play Console. (#9792 by @lukmccall)
- Added Notification categories functionality to allow for interactive push notifications on Android and iOS! (#9015 by @cruzach)
- Added support for channels to local notifications. (#9385 by @lukmccall)
- Added support for custom large icon on the Android. (#9116 by @lukmccall)
- Added
sticky
property, which defines if notification can be dismissed by swipe. (#9351 by @barthap)
- Fix notifications not being displayed after five minutes of phone inactivity on Android. (#9287 by @mczernek)
- Include
content-type: application/json
when requesting an Expo push token (#9332 by @ide) - Export
NotificationPermissions.types
to makeNotifications.IosAuthorizationStatus
available. (#8747 by @brentvatne) - Fixed remote notifications ignoring the
channelId
parameter. (#9080 by @lukmccall) - Fixed malformed data object on iOS. (#9164 by @lukmccall)
- Added
IosAuthorizationStatus.EPHEMERAL
, an option that maps toUNAuthorizationStatusEphemeral
for compatibility with iOS 14. (#8938 by @ide)
- Fixed total incompatibility with the web platform – calling unsupported methods will now throw a readable
UnavailabilityError
. (#8853 by @sjchmiela)
- Fixed compatibility with
expo-permissions
below9.0.0
(the duplicate symbols problem). (#8753 by @sjchmiela)
- Added support for including foreign (non-
expo-notifications
-created) notifications ingetPresentedNotificationsAsync
on Android. (#8614 by @sjchmiela)
- Fixed
getExpoPushTokenAsync
rejecting whengetDevicePushTokenAsync
'sPromise
hasn't fulfilled yet (and vice versa). Probably also added support for calling these methods reliably with Fast Refresh enabled. (#8608 by @sjchmiela)
-
Added native permission requester that will let developers call
Permissions.getAsync(Permissions.NOTIFICATIONS)
(oraskAsync
) when this module is installed. (#8486 by @sjchmiela)Note that the effect of this method is the same as if you called
Notifications.getPermissionsAsync()
(orrequestPermissionsAsync
) and thenNotifications.getDevicePushTokenAsync()
—it tries to both ask the user for user-facing notifications permissions and then tries to register the device for remote notifications. We are planning to deprecate the.NOTIFICATIONS
permission soon.
-
Note that this may or may not be a breaking change for you — if you'd expect the notification to be automatically dismissed when tapped on this is a bug fix and a new feature (fixes inconsistency between platforms as on iOS this is the only supported behavior; adds the ability to customize the behavior on Android). If you'd expect the notification to only be dismissed at your will this is a breaking change and you'll need to add
autoDismiss: false
to your notification content inputs. - Changed the default notification behavior on Android to be automatically dismissed when clicked. This is customizable with the
autoDismiss
parameter ofNotificationContentInput
. (#8241 by @thorbenprimke)
- Added the ability to configure whether the notification should be automatically dismissed when tapped on or not (on Android) with the
autoDismiss
parameter ofNotificationContentInput
. (#8241 by @thorbenprimke) - Added
DailyTriggerInput
that allows scheduling a daily recurring notification for a specific hour and minute. It is supported on both iOS and Android. (#8199 by @thorbenprimke)
- Added a macro check for
UNLocationNotificationTrigger
to make this module compatible with Mac Catalyst (#8171 by @robertying) - Fixed notification content text being truncated without the ability to expand the notification by adding
BigTextStyle
to all Android notifications, which allows them to be expanded and their content text fully viewed (#8140 by @thorbenprimke) - Added a check for trigger input that throws an error if user misuses the
seconds
property (#8261 by @sjchmiela)
- Fixed obsolete and invalid dependency on
>= @unimodules/[email protected]
, bringing backwards compatibility with older versions of@unimodules/core
(#8162 by @sjchmiela)
- Fixed crash when serializing a notification containing a
null
value (#8153 by @sjchmiela) - Fixed a typo in
AndroidImportance
enum (DEEFAULT
is now deprecated in favor ofDEFAULT
) (#8161 by @trevorah)
- Fixed the ability to override the
FirebaseListenerService
without having to add a custom priority. (#8175 by @lukmccall) - Fixed
SoundResolver
causing crash if thesound
property is not defined or doesn't contain a.
(#8150 by @sjchmiela)
- Added a native setting allowing you to use a custom notification icon for Android notifications (#8035 by @sjchmiela)
- Added a native setting and a runtime option allowing you to use a custom notification color for Android notifications (#8035 by @sjchmiela)
- Fixed initial notification not being emitted to
NotificationResponse
listener on iOS (#7958 by @sjchmiela)
- Fixed custom notification sounds not being applied properly to notifications and channels (#8036 by @sjchmiela)
- Fixed iOS rejecting the Promise to schedule a notification if
sound
is not empty or a boolean (#8036 by @sjchmiela)
- Fixed interpretation of
Date
andnumber
triggers when callingscheduleNotificationAsync
on iOS (#7942 by @sjchmiela)