@imatis/react-native-notifications 4.1.2-imatis.15 → 4.1.2-imatis.19
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/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/.project +11 -0
- package/lib/android/.settings/org.eclipse.buildship.core.prefs +11 -0
- package/lib/android/app/src/main/AndroidManifest.xml +2 -1
- package/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/notification/PushNotification.java +9 -5
- package/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/notification/PushNotificationProps.java +4 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/lib/android/.project
CHANGED
|
@@ -14,4 +14,15 @@
|
|
|
14
14
|
<natures>
|
|
15
15
|
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
|
16
16
|
</natures>
|
|
17
|
+
<filteredResources>
|
|
18
|
+
<filter>
|
|
19
|
+
<id>1643077747355</id>
|
|
20
|
+
<name></name>
|
|
21
|
+
<type>30</type>
|
|
22
|
+
<matcher>
|
|
23
|
+
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
|
24
|
+
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
|
25
|
+
</matcher>
|
|
26
|
+
</filter>
|
|
27
|
+
</filteredResources>
|
|
17
28
|
</projectDescription>
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
+
arguments=
|
|
2
|
+
auto.sync=false
|
|
3
|
+
build.scans.enabled=false
|
|
4
|
+
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
|
|
1
5
|
connection.project.dir=
|
|
2
6
|
eclipse.preferences.version=1
|
|
7
|
+
gradle.user.home=
|
|
8
|
+
java.home=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
|
|
9
|
+
jvm.arguments=
|
|
10
|
+
offline.mode=false
|
|
11
|
+
override.workspace.settings=true
|
|
12
|
+
show.console.view=true
|
|
13
|
+
show.executions.view=true
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
<service android:name=".core.ProxyService"/>
|
|
12
12
|
|
|
13
13
|
<service
|
|
14
|
-
android:name=".fcm.FcmInstanceIdListenerService"
|
|
14
|
+
android:name=".fcm.FcmInstanceIdListenerService"
|
|
15
|
+
android:exported="true">
|
|
15
16
|
<intent-filter>
|
|
16
17
|
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
|
17
18
|
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
|
|
@@ -71,11 +71,14 @@ public class PushNotification implements IPushNotification {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
@Override
|
|
74
|
-
public void onReceived()
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
public void onReceived() {
|
|
75
|
+
ReactContext reactContext = mAppLifecycleFacade.getRunningReactContext();
|
|
76
|
+
boolean hasActiveCatalystInstance = reactContext != null && reactContext.hasActiveCatalystInstance();
|
|
77
|
+
if (!mAppLifecycleFacade.isAppVisible() || !hasActiveCatalystInstance) {
|
|
77
78
|
postNotification(null);
|
|
78
|
-
|
|
79
|
+
notifyReceivedBackgroundToJS();
|
|
80
|
+
}
|
|
81
|
+
if (hasActiveCatalystInstance) {
|
|
79
82
|
notifyReceivedToJS();
|
|
80
83
|
}
|
|
81
84
|
}
|
|
@@ -186,7 +189,8 @@ public class PushNotification implements IPushNotification {
|
|
|
186
189
|
.setContentIntent(intent)
|
|
187
190
|
.setDefaults(Notification.DEFAULT_VIBRATE)
|
|
188
191
|
.setAutoCancel(true)
|
|
189
|
-
.setPriority(Notification.PRIORITY_HIGH)
|
|
192
|
+
.setPriority(Notification.PRIORITY_HIGH)
|
|
193
|
+
.setOngoing(mNotificationProps.getOngoing());
|
|
190
194
|
|
|
191
195
|
if (soundUri != null) {
|
|
192
196
|
notification.setSound(soundUri);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imatis/react-native-notifications",
|
|
3
|
-
"version": "4.1.2-imatis.
|
|
3
|
+
"version": "4.1.2-imatis.19",
|
|
4
4
|
"description": "Advanced Push Notifications (Silent, interactive notifications) for iOS & Android",
|
|
5
5
|
"author": "Lidan Hifi <lidan.hifi@gmail.com>",
|
|
6
6
|
"license": "MIT",
|