4.0.0
版本发布时间: 2020-07-06 17:33:45
zo0r/react-native-push-notification最新发布版本:8.1.1(2021-10-01 22:23:33)
Breaking changes
-
RNPushNotificationRegistrationService
has been removed, old reference in AndroidManifest must be removed. -
Notifications.registerNotificationActions()
has been removed and is not required foractions
. -
DeviceEventEmitter.addListener('notificationActionReceived', callback)
is replaced byonAction
. - Extra receiver must be added to manage actions.
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationActions" />
- (iOS)
userInfo
is now populated with id by default to allow operation based onid
.
Features
- (Android)
actions
accept an array of strings. - (Android)
invokeApp
allow you to handle actions in background without invoking the application. - (Android)
onAction
has been added to.configure()
to handle action in background. - (Android)
PushNotification.invokeApp(notification)
allow you to invoke the application when in background (notification for initial notification). - (Android)
PushNotification.getChannels(callback)
allow you to get the list of channels. - (Android)
PushNotification.channelExists(channel_id, callback)
allow you to check of a channel exists. - (Android)
PushNotification.channelBlocked(channel_id, callback)
allow you to check of a channel is blocked. Based on #1249 - (Android)
PushNotification.deleteChannel(channel_id)
allow you to delete a channel. - (Android) Add
largeIconUrl
to load a largeIcon based on Url. Based on #1444 - (Android) Add
bigPictureUrl
to load a picture based on Url. Based on #1444 - (Android) Add
shortcutId
for better badges management. - (Android) Add
showWhen
to display "when" it was published, default: true. - (Android) Add
groupSummary
to allow grouping notifications. Based on #1253 - (Android) Add
channelId
, custom channel_id in android. Based on #1159 - (Android) Add
channelName
, custom channel_name in android. - (Android) Add
channelDescription
, custom channel_description in android. - (iOS) Add fire date in notification response, NOTE:
push-notification-ios
in version> 1.2.0
#1345 - (iOS)
onRegistrationError
has been added to.configure()
to handleregistrationError
events. - (Android/iOS) Add method getScheduledLocalNotifications()#1466
Fixed
- (Android) Replace java.util.Random with java.security.SecureRandom #1497
- (Android) WAKE_LOCK permission removed from documentation. #1494
- (Android) Some options were ignored on scheduled/repeating notifications (allowWhileIdle, ignoreInForeground).
- (Android/iOS) popInitialInotification might be ignored in
.configure()