@@ -109,7 +109,9 @@ private PendingIntent toScheduleNotificationIntent(Bundle bundle) {
109
109
notificationIntent .putExtra (RNPushNotificationPublisher .NOTIFICATION_ID , notificationID );
110
110
notificationIntent .putExtras (bundle );
111
111
112
- return PendingIntent .getBroadcast (context , notificationID , notificationIntent , Build .VERSION .SDK_INT >= Build .VERSION_CODES .M ? PendingIntent .FLAG_UPDATE_CURRENT | PendingIntent .FLAG_IMMUTABLE : PendingIntent .FLAG_UPDATE_CURRENT );
112
+ int flags = Build .VERSION .SDK_INT >= Build .VERSION_CODES .M ? PendingIntent .FLAG_UPDATE_CURRENT | PendingIntent .FLAG_IMMUTABLE : PendingIntent .FLAG_UPDATE_CURRENT ;
113
+
114
+ return PendingIntent .getBroadcast (context , notificationID , notificationIntent , flags );
113
115
} catch (Exception e ) {
114
116
Log .e (LOG_TAG , "Unable to parse Notification ID" , e );
115
117
}
@@ -531,8 +533,10 @@ public void sendToNotificationCentreWithPicture(Bundle bundle, Bitmap largeIconB
531
533
intent .putExtra ("message_id" , messageId );
532
534
}
533
535
534
- PendingIntent pendingActionIntent = PendingIntent .getBroadcast (context , notificationID , actionIntent ,
535
- PendingIntent .FLAG_UPDATE_CURRENT );
536
+ int flags = Build .VERSION .SDK_INT >= Build .VERSION_CODES .M ? PendingIntent .FLAG_UPDATE_CURRENT | PendingIntent .FLAG_IMMUTABLE : PendingIntent .FLAG_UPDATE_CURRENT ;
537
+
538
+ PendingIntent pendingActionIntent = PendingIntent .getBroadcast (context , notificationID , actionIntent , flags );
539
+
536
540
if (action .equals ("ReplyInput" )){
537
541
//Action with inline reply
538
542
if (android .os .Build .VERSION .SDK_INT >= android .os .Build .VERSION_CODES .KITKAT_WATCH ){
0 commit comments