2022-04-07 19:14:04 +00:00
|
|
|
diff --git a/node_modules/react-native-notifications/android/app/src/reactNative59/java/com/wix/reactnativenotifications/NotificationManagerCompatFacade.java b/node_modules/react-native-notifications/android/app/src/reactNative59/java/com/wix/reactnativenotifications/NotificationManagerCompatFacade.java
|
|
|
|
index f9c858b..94ea188 100644
|
|
|
|
--- a/node_modules/react-native-notifications/android/app/src/reactNative59/java/com/wix/reactnativenotifications/NotificationManagerCompatFacade.java
|
|
|
|
+++ b/node_modules/react-native-notifications/android/app/src/reactNative59/java/com/wix/reactnativenotifications/NotificationManagerCompatFacade.java
|
|
|
|
@@ -2,8 +2,8 @@
|
|
|
|
package com.wix.reactnativenotifications;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
-import android.support.annotation.NonNull;
|
|
|
|
-import android.support.v4.app.NotificationManagerCompat;
|
|
|
|
+import androidx.annotation.NonNull;
|
|
|
|
+import androidx.core.app.NotificationManagerCompat;
|
|
|
|
|
|
|
|
public abstract class NotificationManagerCompatFacade {
|
|
|
|
public static NotificationManagerCompat from(@NonNull Context context) {
|
2022-10-04 13:25:31 +00:00
|
|
|
diff --git a/node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java b/node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java
|
|
|
|
index 90969b2..4c00e69 100644
|
|
|
|
--- a/node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java
|
|
|
|
+++ b/node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java
|
|
|
|
@@ -63,7 +63,7 @@ public class RNNotificationsModule extends ReactContextBaseJavaModule implements
|
|
|
|
@Override
|
|
|
|
public void onNewIntent(Intent intent) {
|
|
|
|
if (NotificationIntentAdapter.canHandleIntent(intent)) {
|
|
|
|
- Bundle notificationData = intent.getExtras();
|
|
|
|
+ Bundle notificationData = NotificationIntentAdapter.extractPendingNotificationDataFromIntent(intent);
|
|
|
|
final IPushNotification notification = PushNotification.get(getReactApplicationContext().getApplicationContext(), notificationData);
|
|
|
|
if (notification != null) {
|
|
|
|
notification.onOpened();
|
|
|
|
diff --git a/node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java b/node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java
|
|
|
|
index eadf41e..a3f71dd 100644
|
|
|
|
--- a/node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java
|
|
|
|
+++ b/node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java
|
|
|
|
@@ -96,8 +96,7 @@ public class RNNotificationsPackage implements ReactPackage, AppLifecycleFacade.
|
|
|
|
Intent intent = activity.getIntent();
|
|
|
|
if (NotificationIntentAdapter.canHandleIntent(intent)) {
|
|
|
|
Context appContext = mApplication.getApplicationContext();
|
|
|
|
- Bundle notificationData = NotificationIntentAdapter.cannotHandleTrampolineActivity(appContext) ?
|
|
|
|
- NotificationIntentAdapter.extractPendingNotificationDataFromIntent(intent) : intent.getExtras();
|
|
|
|
+ Bundle notificationData = NotificationIntentAdapter.extractPendingNotificationDataFromIntent(intent);
|
|
|
|
final IPushNotification pushNotification = PushNotification.get(appContext, notificationData);
|
|
|
|
if (pushNotification != null) {
|
|
|
|
pushNotification.onOpened();
|
|
|
|
diff --git a/node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/NotificationIntentAdapter.java b/node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/NotificationIntentAdapter.java
|
|
|
|
index 41b4824..4285ac5 100644
|
|
|
|
--- a/node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/NotificationIntentAdapter.java
|
|
|
|
+++ b/node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/NotificationIntentAdapter.java
|
|
|
|
@@ -14,17 +14,9 @@ public class NotificationIntentAdapter {
|
|
|
|
|
|
|
|
@SuppressLint("UnspecifiedImmutableFlag")
|
|
|
|
public static PendingIntent createPendingNotificationIntent(Context appContext, PushNotificationProps notification) {
|
|
|
|
- if (cannotHandleTrampolineActivity(appContext)) {
|
|
|
|
- Intent mainActivityIntent = appContext.getPackageManager().getLaunchIntentForPackage(appContext.getPackageName());
|
|
|
|
- mainActivityIntent.putExtra(PUSH_NOTIFICATION_EXTRA_NAME, notification.asBundle());
|
|
|
|
- TaskStackBuilder taskStackBuilder = TaskStackBuilder.create(appContext);
|
|
|
|
- taskStackBuilder.addNextIntentWithParentStack(mainActivityIntent);
|
|
|
|
- return taskStackBuilder.getPendingIntent((int) System.currentTimeMillis(), PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE);
|
|
|
|
- } else {
|
|
|
|
- Intent intent = new Intent(appContext, ProxyService.class);
|
|
|
|
- intent.putExtra(PUSH_NOTIFICATION_EXTRA_NAME, notification.asBundle());
|
|
|
|
- return PendingIntent.getService(appContext, (int) System.currentTimeMillis(), intent, PendingIntent.FLAG_ONE_SHOT);
|
|
|
|
- }
|
|
|
|
+ Intent intent = appContext.getPackageManager().getLaunchIntentForPackage(appContext.getPackageName());
|
|
|
|
+ intent.putExtra(PUSH_NOTIFICATION_EXTRA_NAME, notification.asBundle());
|
|
|
|
+ return PendingIntent.getActivity(appContext, (int) System.currentTimeMillis(), intent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static boolean cannotHandleTrampolineActivity(Context appContext) {
|
2022-04-07 19:14:04 +00:00
|
|
|
diff --git a/node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/notification/PushNotification.java b/node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/notification/PushNotification.java
|
2022-10-04 13:25:31 +00:00
|
|
|
index 54a5fb8..06bbfb9 100644
|
2022-04-07 19:14:04 +00:00
|
|
|
--- a/node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/notification/PushNotification.java
|
|
|
|
+++ b/node_modules/react-native-notifications/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/notification/PushNotification.java
|
|
|
|
@@ -28,7 +28,7 @@ public class PushNotification implements IPushNotification {
|
|
|
|
final protected AppLifecycleFacade mAppLifecycleFacade;
|
|
|
|
final protected AppLaunchHelper mAppLaunchHelper;
|
|
|
|
final protected JsIOHelper mJsIOHelper;
|
|
|
|
- final protected PushNotificationProps mNotificationProps;
|
|
|
|
+ protected PushNotificationProps mNotificationProps;
|
|
|
|
final protected AppVisibilityListener mAppVisibilityListener = new AppVisibilityListener() {
|
|
|
|
@Override
|
|
|
|
public void onAppVisible() {
|
|
|
|
diff --git a/node_modules/react-native-notifications/lib/android/app/src/reactNative59/java/com/wix/reactnativenotifications/NotificationManagerCompatFacade.java b/node_modules/react-native-notifications/lib/android/app/src/reactNative59/java/com/wix/reactnativenotifications/NotificationManagerCompatFacade.java
|
|
|
|
index f9c858b..94ea188 100644
|
|
|
|
--- a/node_modules/react-native-notifications/lib/android/app/src/reactNative59/java/com/wix/reactnativenotifications/NotificationManagerCompatFacade.java
|
|
|
|
+++ b/node_modules/react-native-notifications/lib/android/app/src/reactNative59/java/com/wix/reactnativenotifications/NotificationManagerCompatFacade.java
|
|
|
|
@@ -2,8 +2,8 @@
|
|
|
|
package com.wix.reactnativenotifications;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
-import android.support.annotation.NonNull;
|
|
|
|
-import android.support.v4.app.NotificationManagerCompat;
|
|
|
|
+import androidx.annotation.NonNull;
|
|
|
|
+import androidx.core.app.NotificationManagerCompat;
|
|
|
|
|
|
|
|
public abstract class NotificationManagerCompatFacade {
|
|
|
|
public static NotificationManagerCompat from(@NonNull Context context) {
|
2022-09-23 20:35:03 +00:00
|
|
|
diff --git a/node_modules/react-native-notifications/lib/ios/RCTConvert+RNNotifications.h b/node_modules/react-native-notifications/lib/ios/RCTConvert+RNNotifications.h
|
|
|
|
index 8b2c269..8667351 100644
|
|
|
|
--- a/node_modules/react-native-notifications/lib/ios/RCTConvert+RNNotifications.h
|
|
|
|
+++ b/node_modules/react-native-notifications/lib/ios/RCTConvert+RNNotifications.h
|
|
|
|
@@ -1,5 +1,5 @@
|
|
|
|
#import <React/RCTConvert.h>
|
|
|
|
-@import UserNotifications;
|
|
|
|
+#import <UserNotifications/UserNotifications.h>
|
|
|
|
|
|
|
|
@interface RCTConvert (UIMutableUserNotificationAction)
|
|
|
|
+ (UIMutableUserNotificationAction *)UIMutableUserNotificationAction:(id)json;
|
|
|
|
diff --git a/node_modules/react-native-notifications/lib/ios/RNNotificationCenter.h b/node_modules/react-native-notifications/lib/ios/RNNotificationCenter.h
|
|
|
|
index 4bc5292..4839d55 100644
|
|
|
|
--- a/node_modules/react-native-notifications/lib/ios/RNNotificationCenter.h
|
|
|
|
+++ b/node_modules/react-native-notifications/lib/ios/RNNotificationCenter.h
|
|
|
|
@@ -4,7 +4,7 @@ typedef void (^RCTPromiseResolveBlock)(id result);
|
|
|
|
typedef void (^RCTResponseSenderBlock)(NSArray *response);
|
|
|
|
typedef void (^RCTPromiseRejectBlock)(NSString *code, NSString *message, NSError *error);
|
|
|
|
|
|
|
|
-@import UserNotifications;
|
|
|
|
+#import <UserNotifications/UserNotifications.h>
|
|
|
|
|
|
|
|
@interface RNNotificationCenter : NSObject
|
|
|
|
|
|
|
|
diff --git a/node_modules/react-native-notifications/lib/ios/RNNotificationEventHandler.h b/node_modules/react-native-notifications/lib/ios/RNNotificationEventHandler.h
|
|
|
|
index a07c6e9..8e3ca6a 100644
|
|
|
|
--- a/node_modules/react-native-notifications/lib/ios/RNNotificationEventHandler.h
|
|
|
|
+++ b/node_modules/react-native-notifications/lib/ios/RNNotificationEventHandler.h
|
|
|
|
@@ -1,5 +1,5 @@
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
-@import UserNotifications;
|
|
|
|
+#import <UserNotifications/UserNotifications.h>
|
|
|
|
#import "RNNotificationsStore.h"
|
|
|
|
#import "RNEventEmitter.h"
|
|
|
|
|
|
|
|
diff --git a/node_modules/react-native-notifications/lib/ios/RNNotificationParser.h b/node_modules/react-native-notifications/lib/ios/RNNotificationParser.h
|
|
|
|
index 7aa2bfb..c1c019c 100644
|
|
|
|
--- a/node_modules/react-native-notifications/lib/ios/RNNotificationParser.h
|
|
|
|
+++ b/node_modules/react-native-notifications/lib/ios/RNNotificationParser.h
|
|
|
|
@@ -1,5 +1,5 @@
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
-@import UserNotifications;
|
|
|
|
+#import <UserNotifications/UserNotifications.h>
|
|
|
|
|
|
|
|
@interface RNNotificationParser : NSObject
|
|
|
|
|
|
|
|
diff --git a/node_modules/react-native-notifications/lib/ios/RNNotificationsStore.h b/node_modules/react-native-notifications/lib/ios/RNNotificationsStore.h
|
|
|
|
index 4f8a171..7e4f9ca 100644
|
|
|
|
--- a/node_modules/react-native-notifications/lib/ios/RNNotificationsStore.h
|
|
|
|
+++ b/node_modules/react-native-notifications/lib/ios/RNNotificationsStore.h
|
|
|
|
@@ -1,6 +1,6 @@
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
-@import UserNotifications;
|
|
|
|
+#import <UserNotifications/UserNotifications.h>
|
|
|
|
|
|
|
|
@interface RNNotificationsStore : NSObject
|
|
|
|
|