@imatis/react-native-notifications 4.2.4-imatis.21 → 4.3.1-imatis.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.gren.md +167 -79
- package/android/app/src/reactNative59/reactNative59.iml +11 -0
- package/android/app/src/reactNative60/reactNative60.iml +11 -0
- package/lib/android/.gradle/6.1.1/executionHistory/executionHistory.lock +0 -0
- package/lib/android/.gradle/6.1.1/fileHashes/fileHashes.bin +0 -0
- package/lib/android/.gradle/6.1.1/fileHashes/fileHashes.lock +0 -0
- package/lib/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/lib/android/.gradle/buildOutputCleanup/cache.properties +1 -1
- package/lib/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/lib/android/.gradle/checksums/checksums.lock +0 -0
- package/lib/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/lib/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java +3 -1
- package/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/ReactAppLifecycleFacade.java +5 -1
- package/lib/android/local.properties +2 -2
- package/lib/dist/adapters/NativeEventsReceiver.d.ts +1 -0
- package/lib/dist/adapters/NativeEventsReceiver.js +3 -0
- package/lib/dist/events/EventsRegistry.d.ts +1 -0
- package/lib/dist/events/EventsRegistry.js +3 -0
- package/lib/ios/RNEventEmitter.h +1 -0
- package/lib/ios/RNEventEmitter.m +1 -0
- package/lib/ios/RNNotificationCenter.m +4 -0
- package/lib/ios/RNNotifications.xcodeproj/project.xcworkspace/xcuserdata/troy.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/lib/src/adapters/NativeEventsReceiver.ts +6 -2
- package/lib/src/events/EventsRegistry.ts +4 -0
- package/package-lock.json +13507 -0
- package/package.json +2 -2
- package/react-native.config.js +0 -1
- package/lib/android/.gradle/6.1.1/executionHistory/executionHistory.bin +0 -0
- package/lib/android/.gradle/6.1.1/fileContent/fileContent.lock +0 -0
- package/lib/android/.gradle/6.1.1/fileHashes/resourceHashesCache.bin +0 -0
- package/lib/android/.gradle/6.1.1/javaCompile/classAnalysis.bin +0 -0
- package/lib/android/.gradle/6.1.1/javaCompile/jarAnalysis.bin +0 -0
- package/lib/android/.gradle/6.1.1/javaCompile/javaCompile.lock +0 -0
- package/lib/android/.gradle/6.1.1/javaCompile/taskHistory.bin +0 -0
- package/lib/android/app/src/test/java/com/wix/reactnativenotifications/core/AppLaunchHelperTest.java +0 -117
- package/lib/android/app/src/test/java/com/wix/reactnativenotifications/core/InitialNotificationHolderTest.java +0 -59
- package/lib/android/app/src/test/java/com/wix/reactnativenotifications/core/JsIOHelperTest.java +0 -60
- package/lib/android/app/src/test/java/com/wix/reactnativenotifications/core/notification/PushNotificationTest.java +0 -381
- package/lib/android/app/src/test/java/com/wix/reactnativenotifications/core/notificationdrawer/PushNotificationsDrawerTest.java +0 -96
- package/lib/android/app/src/test/resources/robolectric.properties +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="JAVA_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
+
<exclude-output />
|
|
5
|
+
<content url="file://$MODULE_DIR$">
|
|
6
|
+
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
|
|
7
|
+
</content>
|
|
8
|
+
<orderEntry type="inheritedJdk" />
|
|
9
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
10
|
+
</component>
|
|
11
|
+
</module>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="JAVA_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
+
<exclude-output />
|
|
5
|
+
<content url="file://$MODULE_DIR$">
|
|
6
|
+
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
|
|
7
|
+
</content>
|
|
8
|
+
<orderEntry type="inheritedJdk" />
|
|
9
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
10
|
+
</component>
|
|
11
|
+
</module>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#
|
|
1
|
+
#Mon Jul 12 10:27:56 ICT 2021
|
|
2
2
|
gradle.version=6.1.1
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java
CHANGED
|
@@ -88,8 +88,10 @@ public class RNNotificationsModule extends ReactContextBaseJavaModule implements
|
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
InitialNotificationHolder.getInstance().clear();
|
|
92
91
|
result = Arguments.fromBundle(notification.asBundle());
|
|
92
|
+
InitialNotificationHolder.getInstance().clear();
|
|
93
|
+
} catch (NullPointerException e) {
|
|
94
|
+
Log.e(LOGTAG, "getInitialNotification: Null pointer exception");
|
|
93
95
|
} finally {
|
|
94
96
|
promise.resolve(result);
|
|
95
97
|
}
|
|
@@ -47,7 +47,11 @@ public class ReactAppLifecycleFacade implements AppLifecycleFacade {
|
|
|
47
47
|
return false;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
try {
|
|
51
|
+
return mReactContext.hasActiveCatalystInstance();
|
|
52
|
+
} catch (Exception e) {
|
|
53
|
+
return mReactContext.hasActiveReactInstance();
|
|
54
|
+
}
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
@Override
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
# Location of the SDK. This is only used by Gradle.
|
|
5
5
|
# For customization when using a Version Control System, please read the
|
|
6
6
|
# header note.
|
|
7
|
-
#
|
|
8
|
-
sdk.dir=/Users/
|
|
7
|
+
#Mon Jul 12 10:26:56 ICT 2021
|
|
8
|
+
sdk.dir=/Users/troy/Library/Android/sdk
|
|
@@ -15,4 +15,5 @@ export declare class NativeEventsReceiver {
|
|
|
15
15
|
registerPushKitNotificationReceived(callback: (event: object) => void): EmitterSubscription;
|
|
16
16
|
registerNotificationOpened(callback: (notification: Notification, actionResponse?: NotificationActionResponse) => void): EmitterSubscription;
|
|
17
17
|
registerRemoteNotificationsRegistrationFailed(callback: (event: RegistrationError) => void): EmitterSubscription;
|
|
18
|
+
registerRemoteNotificationsRegistrationDenied(callback: () => void): EmitterSubscription;
|
|
18
19
|
}
|
|
@@ -39,5 +39,8 @@ class NativeEventsReceiver {
|
|
|
39
39
|
registerRemoteNotificationsRegistrationFailed(callback) {
|
|
40
40
|
return this.emitter.addListener('remoteNotificationsRegistrationFailed', callback);
|
|
41
41
|
}
|
|
42
|
+
registerRemoteNotificationsRegistrationDenied(callback) {
|
|
43
|
+
return this.emitter.addListener('remoteNotificationsRegistrationDenied', callback);
|
|
44
|
+
}
|
|
42
45
|
}
|
|
43
46
|
exports.NativeEventsReceiver = NativeEventsReceiver;
|
|
@@ -14,4 +14,5 @@ export declare class EventsRegistry {
|
|
|
14
14
|
registerNotificationReceivedBackground(callback: (notification: Notification, completion: (response: NotificationBackgroundFetchResult) => void) => void): EmitterSubscription;
|
|
15
15
|
registerNotificationOpened(callback: (notification: Notification, completion: () => void, actionResponse?: NotificationActionResponse) => void): EmitterSubscription;
|
|
16
16
|
registerRemoteNotificationsRegistrationFailed(callback: (event: RegistrationError) => void): EmitterSubscription;
|
|
17
|
+
registerRemoteNotificationsRegistrationDenied(callback: () => void): EmitterSubscription;
|
|
17
18
|
}
|
|
@@ -21,5 +21,8 @@ class EventsRegistry {
|
|
|
21
21
|
registerRemoteNotificationsRegistrationFailed(callback) {
|
|
22
22
|
return this.nativeEventsReceiver.registerRemoteNotificationsRegistrationFailed(callback);
|
|
23
23
|
}
|
|
24
|
+
registerRemoteNotificationsRegistrationDenied(callback) {
|
|
25
|
+
return this.nativeEventsReceiver.registerRemoteNotificationsRegistrationDenied(callback);
|
|
26
|
+
}
|
|
24
27
|
}
|
|
25
28
|
exports.EventsRegistry = EventsRegistry;
|
package/lib/ios/RNEventEmitter.h
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#import <React/RCTEventEmitter.h>
|
|
2
2
|
|
|
3
3
|
static NSString* const RNRegistered = @"remoteNotificationsRegistered";
|
|
4
|
+
static NSString* const RNRegistrationDenied = @"remoteNotificationsRegistrationDenied";
|
|
4
5
|
static NSString* const RNRegistrationFailed = @"remoteNotificationsRegistrationFailed";
|
|
5
6
|
static NSString* const RNPushKitRegistered = @"pushKitRegistered";
|
|
6
7
|
static NSString* const RNNotificationReceived = @"notificationReceived";
|
package/lib/ios/RNEventEmitter.m
CHANGED
|
Binary file
|
|
@@ -25,13 +25,13 @@ export class NativeEventsReceiver {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
public registerNotificationReceived(callback: (notification: Notification) => void): EmitterSubscription {
|
|
28
|
-
return this.emitter.addListener('notificationReceived', (payload) => {
|
|
28
|
+
return this.emitter.addListener('notificationReceived', (payload: unknown) => {
|
|
29
29
|
callback(this.notificationFactory.fromPayload(payload));
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
public registerNotificationReceivedBackground(callback: (notification: Notification) => void): EmitterSubscription {
|
|
34
|
-
return this.emitter.addListener('notificationReceivedBackground', (payload) => {
|
|
34
|
+
return this.emitter.addListener('notificationReceivedBackground', (payload: unknown) => {
|
|
35
35
|
callback(this.notificationFactory.fromPayload(payload));
|
|
36
36
|
});
|
|
37
37
|
}
|
|
@@ -50,4 +50,8 @@ export class NativeEventsReceiver {
|
|
|
50
50
|
public registerRemoteNotificationsRegistrationFailed(callback: (event: RegistrationError) => void): EmitterSubscription {
|
|
51
51
|
return this.emitter.addListener('remoteNotificationsRegistrationFailed', callback);
|
|
52
52
|
}
|
|
53
|
+
|
|
54
|
+
public registerRemoteNotificationsRegistrationDenied(callback: () => void): EmitterSubscription {
|
|
55
|
+
return this.emitter.addListener('remoteNotificationsRegistrationDenied', callback);
|
|
56
|
+
}
|
|
53
57
|
}
|
|
@@ -34,4 +34,8 @@ export class EventsRegistry {
|
|
|
34
34
|
public registerRemoteNotificationsRegistrationFailed(callback: (event: RegistrationError) => void): EmitterSubscription {
|
|
35
35
|
return this.nativeEventsReceiver.registerRemoteNotificationsRegistrationFailed(callback);
|
|
36
36
|
}
|
|
37
|
+
|
|
38
|
+
public registerRemoteNotificationsRegistrationDenied(callback: () => void): EmitterSubscription {
|
|
39
|
+
return this.nativeEventsReceiver.registerRemoteNotificationsRegistrationDenied(callback);
|
|
40
|
+
}
|
|
37
41
|
}
|