expo-notifications 0.28.1 → 0.28.3
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.md +12 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/notifications/NotificationsPackage.java +17 -1
- package/android/src/main/java/expo/modules/notifications/notifications/NotificationManager.java +22 -0
- package/android/src/main/java/expo/modules/notifications/notifications/NotificationSerializer.java +28 -5
- package/android/src/main/java/expo/modules/notifications/notifications/emitting/NotificationsEmitter.kt +9 -6
- package/android/src/main/java/expo/modules/notifications/notifications/interfaces/NotificationListener.java +10 -0
- package/android/src/main/java/expo/modules/notifications/service/delegates/ExpoNotificationLifecycleListener.java +76 -0
- package/build/Notifications.types.d.ts +2 -0
- package/build/Notifications.types.d.ts.map +1 -1
- package/build/Notifications.types.js.map +1 -1
- package/build/NotificationsEmitter.d.ts.map +1 -1
- package/build/NotificationsEmitter.js +15 -1
- package/build/NotificationsEmitter.js.map +1 -1
- package/ios/EXNotifications/Building/EXNotificationBuilder.m +20 -0
- package/ios/EXNotifications/Notifications/EXNotificationSerializer.m +17 -0
- package/package.json +2 -2
- package/src/Notifications.types.ts +20 -0
- package/src/NotificationsEmitter.ts +16 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,18 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 0.28.3 — 2024-05-16
|
|
14
|
+
|
|
15
|
+
### 💡 Others
|
|
16
|
+
|
|
17
|
+
- [iOS] Add support for `interruptionLevel`. ([#28921](https://github.com/expo/expo/pull/28921) by [@lukmccall](https://github.com/lukmccall))
|
|
18
|
+
|
|
19
|
+
## 0.28.2 — 2024-05-15
|
|
20
|
+
|
|
21
|
+
### 🐛 Bug fixes
|
|
22
|
+
|
|
23
|
+
- [Android] fix response handling when app in background or not running. ([#28883](https://github.com/expo/expo/pull/28883) by [@douglowder](https://github.com/douglowder))
|
|
24
|
+
|
|
13
25
|
## 0.28.1 — 2024-04-23
|
|
14
26
|
|
|
15
27
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
2
|
|
|
3
3
|
group = 'host.exp.exponent'
|
|
4
|
-
version = '0.28.
|
|
4
|
+
version = '0.28.3'
|
|
5
5
|
|
|
6
6
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
7
7
|
apply from: expoModulesCorePlugin
|
|
@@ -14,7 +14,7 @@ android {
|
|
|
14
14
|
namespace "expo.modules.notifications"
|
|
15
15
|
defaultConfig {
|
|
16
16
|
versionCode 21
|
|
17
|
-
versionName '0.28.
|
|
17
|
+
versionName '0.28.3'
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
buildFeatures {
|
|
@@ -3,22 +3,32 @@ package expo.modules.notifications;
|
|
|
3
3
|
import android.content.Context;
|
|
4
4
|
|
|
5
5
|
import java.util.Arrays;
|
|
6
|
+
import java.util.Collections;
|
|
6
7
|
import java.util.List;
|
|
7
8
|
|
|
8
9
|
import expo.modules.core.BasePackage;
|
|
9
10
|
import expo.modules.core.interfaces.InternalModule;
|
|
11
|
+
import expo.modules.core.interfaces.ReactActivityLifecycleListener;
|
|
10
12
|
import expo.modules.core.interfaces.SingletonModule;
|
|
11
13
|
import expo.modules.notifications.notifications.NotificationManager;
|
|
12
14
|
import expo.modules.notifications.notifications.categories.serializers.ExpoNotificationsCategoriesSerializer;
|
|
13
15
|
import expo.modules.notifications.notifications.channels.AndroidXNotificationsChannelsProvider;
|
|
16
|
+
import expo.modules.notifications.service.delegates.ExpoNotificationLifecycleListener;
|
|
14
17
|
import expo.modules.notifications.tokens.PushTokenManager;
|
|
15
18
|
|
|
16
19
|
public class NotificationsPackage extends BasePackage {
|
|
20
|
+
|
|
21
|
+
private NotificationManager mNotificationManager;
|
|
22
|
+
|
|
23
|
+
public NotificationsPackage() {
|
|
24
|
+
mNotificationManager = new NotificationManager();
|
|
25
|
+
}
|
|
26
|
+
|
|
17
27
|
@Override
|
|
18
28
|
public List<SingletonModule> createSingletonModules(Context context) {
|
|
19
29
|
return Arrays.asList(
|
|
20
30
|
new PushTokenManager(),
|
|
21
|
-
|
|
31
|
+
mNotificationManager
|
|
22
32
|
);
|
|
23
33
|
}
|
|
24
34
|
|
|
@@ -29,4 +39,10 @@ public class NotificationsPackage extends BasePackage {
|
|
|
29
39
|
new ExpoNotificationsCategoriesSerializer()
|
|
30
40
|
);
|
|
31
41
|
}
|
|
42
|
+
|
|
43
|
+
@Override
|
|
44
|
+
public List<ReactActivityLifecycleListener> createReactActivityLifecycleListeners(Context activityContext) {
|
|
45
|
+
return Collections.singletonList(new ExpoNotificationLifecycleListener(activityContext, mNotificationManager));
|
|
46
|
+
}
|
|
32
47
|
}
|
|
48
|
+
|
package/android/src/main/java/expo/modules/notifications/notifications/NotificationManager.java
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
package expo.modules.notifications.notifications;
|
|
2
2
|
|
|
3
|
+
import android.os.Bundle;
|
|
4
|
+
import android.util.Log;
|
|
5
|
+
|
|
3
6
|
import expo.modules.core.interfaces.SingletonModule;
|
|
4
7
|
|
|
5
8
|
import java.lang.ref.WeakReference;
|
|
@@ -22,6 +25,7 @@ public class NotificationManager implements SingletonModule, expo.modules.notifi
|
|
|
22
25
|
*/
|
|
23
26
|
private WeakHashMap<NotificationListener, WeakReference<NotificationListener>> mListenerReferenceMap;
|
|
24
27
|
private Collection<NotificationResponse> mPendingNotificationResponses = new ArrayList<>();
|
|
28
|
+
private Collection<Bundle> mPendingNotificationResponsesFromExtras = new ArrayList<>();
|
|
25
29
|
|
|
26
30
|
public NotificationManager() {
|
|
27
31
|
mListenerReferenceMap = new WeakHashMap<>();
|
|
@@ -53,6 +57,11 @@ public class NotificationManager implements SingletonModule, expo.modules.notifi
|
|
|
53
57
|
listener.onNotificationResponseReceived(pendingResponse);
|
|
54
58
|
}
|
|
55
59
|
}
|
|
60
|
+
if (!mPendingNotificationResponsesFromExtras.isEmpty()) {
|
|
61
|
+
for (Bundle extras : mPendingNotificationResponsesFromExtras) {
|
|
62
|
+
listener.onNotificationResponseIntentReceived(extras);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
56
65
|
}
|
|
57
66
|
}
|
|
58
67
|
|
|
@@ -116,4 +125,17 @@ public class NotificationManager implements SingletonModule, expo.modules.notifi
|
|
|
116
125
|
}
|
|
117
126
|
}
|
|
118
127
|
}
|
|
128
|
+
|
|
129
|
+
public void onNotificationResponseFromExtras(Bundle extras) {
|
|
130
|
+
if (mPendingNotificationResponsesFromExtras.isEmpty()) {
|
|
131
|
+
mPendingNotificationResponsesFromExtras.add(extras);
|
|
132
|
+
} else {
|
|
133
|
+
for (WeakReference<NotificationListener> listenerReference : mListenerReferenceMap.values()) {
|
|
134
|
+
NotificationListener listener = listenerReference.get();
|
|
135
|
+
if (listener != null) {
|
|
136
|
+
listener.onNotificationResponseIntentReceived(extras);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
119
141
|
}
|
package/android/src/main/java/expo/modules/notifications/notifications/NotificationSerializer.java
CHANGED
|
@@ -3,9 +3,9 @@ package expo.modules.notifications.notifications;
|
|
|
3
3
|
import android.os.Build;
|
|
4
4
|
import android.os.Bundle;
|
|
5
5
|
|
|
6
|
-
import androidx.annotation.NonNull;
|
|
7
6
|
import androidx.annotation.Nullable;
|
|
8
7
|
|
|
8
|
+
import org.jetbrains.annotations.NotNull;
|
|
9
9
|
import org.json.JSONArray;
|
|
10
10
|
import org.json.JSONObject;
|
|
11
11
|
import expo.modules.core.arguments.MapArguments;
|
|
@@ -19,16 +19,12 @@ import java.util.Set;
|
|
|
19
19
|
|
|
20
20
|
import expo.modules.notifications.notifications.interfaces.NotificationTrigger;
|
|
21
21
|
import expo.modules.notifications.notifications.model.Notification;
|
|
22
|
-
import expo.modules.notifications.notifications.model.NotificationAction;
|
|
23
|
-
import expo.modules.notifications.notifications.model.NotificationCategory;
|
|
24
22
|
import expo.modules.notifications.notifications.model.NotificationContent;
|
|
25
23
|
import expo.modules.notifications.notifications.model.NotificationRequest;
|
|
26
24
|
import expo.modules.notifications.notifications.model.NotificationResponse;
|
|
27
|
-
import expo.modules.notifications.notifications.model.TextInputNotificationAction;
|
|
28
25
|
import expo.modules.notifications.notifications.model.TextInputNotificationResponse;
|
|
29
26
|
import expo.modules.notifications.notifications.model.triggers.FirebaseNotificationTrigger;
|
|
30
27
|
|
|
31
|
-
import expo.modules.notifications.notifications.triggers.ChannelAwareTrigger;
|
|
32
28
|
import expo.modules.notifications.notifications.triggers.DailyTrigger;
|
|
33
29
|
import expo.modules.notifications.notifications.triggers.DateTrigger;
|
|
34
30
|
import expo.modules.notifications.notifications.triggers.TimeIntervalTrigger;
|
|
@@ -199,4 +195,31 @@ public class NotificationSerializer {
|
|
|
199
195
|
}
|
|
200
196
|
return null;
|
|
201
197
|
}
|
|
198
|
+
|
|
199
|
+
@NotNull
|
|
200
|
+
public static Bundle toResponseBundleFromExtras(Bundle extras) {
|
|
201
|
+
Bundle serializedContent = new Bundle();
|
|
202
|
+
serializedContent.putString("title", extras.getString("title"));
|
|
203
|
+
serializedContent.putString("body", extras.getString("message"));
|
|
204
|
+
serializedContent.putString("dataString", extras.getString("body"));
|
|
205
|
+
|
|
206
|
+
Bundle serializedTrigger = new Bundle();
|
|
207
|
+
serializedTrigger.putString("type", "push");
|
|
208
|
+
serializedTrigger.putString("channelId", extras.getString("channelId"));
|
|
209
|
+
|
|
210
|
+
Bundle serializedRequest = new Bundle();
|
|
211
|
+
serializedRequest.putString("identifier", extras.getString("google.message_id"));
|
|
212
|
+
serializedRequest.putBundle("trigger", serializedTrigger);
|
|
213
|
+
serializedRequest.putBundle("content", serializedContent);
|
|
214
|
+
|
|
215
|
+
Bundle serializedNotification = new Bundle();
|
|
216
|
+
serializedNotification.putLong("date", extras.getLong("google.sent_time"));
|
|
217
|
+
serializedNotification.putBundle("request", serializedRequest);
|
|
218
|
+
|
|
219
|
+
Bundle serializedResponse = new Bundle();
|
|
220
|
+
serializedResponse.putString("actionIdentifier", "expo.modules.notifications.actions.DEFAULT");
|
|
221
|
+
serializedResponse.putBundle("notification", serializedNotification);
|
|
222
|
+
|
|
223
|
+
return serializedResponse;
|
|
224
|
+
}
|
|
202
225
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
package expo.modules.notifications.notifications.emitting
|
|
2
2
|
|
|
3
3
|
import android.os.Bundle
|
|
4
|
-
import expo.modules.core.interfaces.services.EventEmitter
|
|
5
4
|
import expo.modules.kotlin.modules.Module
|
|
6
5
|
import expo.modules.kotlin.modules.ModuleDefinition
|
|
7
6
|
import expo.modules.notifications.notifications.NotificationSerializer
|
|
@@ -16,8 +15,7 @@ private const val MESSAGES_DELETED_EVENT_NAME = "onNotificationsDeleted"
|
|
|
16
15
|
|
|
17
16
|
open class NotificationsEmitter : Module(), NotificationListener {
|
|
18
17
|
private lateinit var notificationManager: NotificationManager
|
|
19
|
-
private var
|
|
20
|
-
private var eventEmitter: EventEmitter? = null
|
|
18
|
+
private var lastNotificationResponseBundle: Bundle? = null
|
|
21
19
|
|
|
22
20
|
override fun definition() = ModuleDefinition {
|
|
23
21
|
Name("ExpoNotificationsEmitter")
|
|
@@ -40,7 +38,7 @@ open class NotificationsEmitter : Module(), NotificationListener {
|
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
AsyncFunction<Bundle?>("getLastNotificationResponseAsync") {
|
|
43
|
-
|
|
41
|
+
lastNotificationResponseBundle
|
|
44
42
|
}
|
|
45
43
|
}
|
|
46
44
|
|
|
@@ -62,11 +60,16 @@ open class NotificationsEmitter : Module(), NotificationListener {
|
|
|
62
60
|
* @return Whether notification has been handled
|
|
63
61
|
*/
|
|
64
62
|
override fun onNotificationResponseReceived(response: NotificationResponse): Boolean {
|
|
65
|
-
|
|
66
|
-
sendEvent(NEW_RESPONSE_EVENT_NAME,
|
|
63
|
+
lastNotificationResponseBundle = NotificationSerializer.toBundle(response)
|
|
64
|
+
sendEvent(NEW_RESPONSE_EVENT_NAME, lastNotificationResponseBundle)
|
|
67
65
|
return true
|
|
68
66
|
}
|
|
69
67
|
|
|
68
|
+
override fun onNotificationResponseIntentReceived(extras: Bundle?) {
|
|
69
|
+
lastNotificationResponseBundle = NotificationSerializer.toResponseBundleFromExtras(extras)
|
|
70
|
+
sendEvent(NEW_RESPONSE_EVENT_NAME, lastNotificationResponseBundle)
|
|
71
|
+
}
|
|
72
|
+
|
|
70
73
|
/**
|
|
71
74
|
* Callback called when [NotificationManager] gets informed of the fact of message dropping.
|
|
72
75
|
* Emits a [MESSAGES_DELETED_EVENT_NAME] event.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
package expo.modules.notifications.notifications.interfaces;
|
|
2
2
|
|
|
3
|
+
import android.os.Bundle;
|
|
4
|
+
|
|
3
5
|
import com.google.firebase.messaging.FirebaseMessagingService;
|
|
4
6
|
|
|
5
7
|
import expo.modules.notifications.notifications.model.Notification;
|
|
@@ -28,6 +30,14 @@ public interface NotificationListener {
|
|
|
28
30
|
return false;
|
|
29
31
|
}
|
|
30
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Callback called when notification response is received through package lifecycle listeners
|
|
35
|
+
*
|
|
36
|
+
* @param extras Bundle of extras from the lifecycle method
|
|
37
|
+
*/
|
|
38
|
+
default void onNotificationResponseIntentReceived(Bundle extras) {
|
|
39
|
+
}
|
|
40
|
+
|
|
31
41
|
/**
|
|
32
42
|
* Callback called when some notifications are dropped.
|
|
33
43
|
* See {@link FirebaseMessagingService#onDeletedMessages()}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
package expo.modules.notifications.service.delegates;
|
|
2
|
+
|
|
3
|
+
import android.app.Activity;
|
|
4
|
+
import android.app.NotificationChannel;
|
|
5
|
+
import android.app.PendingIntent;
|
|
6
|
+
import android.content.Context;
|
|
7
|
+
import android.content.Intent;
|
|
8
|
+
import android.os.Bundle;
|
|
9
|
+
import android.os.Parcel;
|
|
10
|
+
import android.util.Log;
|
|
11
|
+
|
|
12
|
+
import androidx.core.app.NotificationCompat;
|
|
13
|
+
|
|
14
|
+
import expo.modules.core.interfaces.ReactActivityLifecycleListener;
|
|
15
|
+
import expo.modules.notifications.notifications.NotificationManager;
|
|
16
|
+
import expo.modules.notifications.notifications.model.Notification;
|
|
17
|
+
import expo.modules.notifications.notifications.model.NotificationResponse;
|
|
18
|
+
|
|
19
|
+
public class ExpoNotificationLifecycleListener implements ReactActivityLifecycleListener {
|
|
20
|
+
|
|
21
|
+
private NotificationManager mNotificationManager;
|
|
22
|
+
|
|
23
|
+
public ExpoNotificationLifecycleListener(Context context, NotificationManager notificationManager) {
|
|
24
|
+
mNotificationManager = notificationManager;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* This will be triggered if the app is not running,
|
|
29
|
+
* and is started from clicking on a notification.
|
|
30
|
+
* <p>
|
|
31
|
+
* Notification data will be in activity.intent.extras
|
|
32
|
+
*
|
|
33
|
+
* @param activity
|
|
34
|
+
* @param savedInstanceState
|
|
35
|
+
*/
|
|
36
|
+
@Override
|
|
37
|
+
public void onCreate(Activity activity, Bundle savedInstanceState) {
|
|
38
|
+
Intent intent = activity.getIntent();
|
|
39
|
+
String actionIdentifier = intent.getAction();
|
|
40
|
+
if (intent != null) {
|
|
41
|
+
Bundle extras = intent.getExtras();
|
|
42
|
+
if (extras != null) {
|
|
43
|
+
logExtra("onCreate", extras);
|
|
44
|
+
mNotificationManager.onNotificationResponseFromExtras(extras);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* This will be triggered if the app is running and in the background,
|
|
51
|
+
* and the user clicks on a notification to open the app.
|
|
52
|
+
* <p>
|
|
53
|
+
* Notification data will be in intent.extras
|
|
54
|
+
*
|
|
55
|
+
* @param intent
|
|
56
|
+
* @return
|
|
57
|
+
*/
|
|
58
|
+
@Override
|
|
59
|
+
public boolean onNewIntent(Intent intent) {
|
|
60
|
+
Bundle extras = intent.getExtras();
|
|
61
|
+
String actionIdentifier = intent.getAction();
|
|
62
|
+
if (extras != null) {
|
|
63
|
+
logExtra("onNewIntent", extras);
|
|
64
|
+
mNotificationManager.onNotificationResponseFromExtras(extras);
|
|
65
|
+
}
|
|
66
|
+
return ReactActivityLifecycleListener.super.onNewIntent(intent);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
private void logExtra(String method, Bundle extra) {
|
|
70
|
+
Log.d("ExpoNotificationLifecycleListener", method + " : keys count = " + extra.keySet().size());
|
|
71
|
+
|
|
72
|
+
for (String key : extra.keySet()) {
|
|
73
|
+
Log.d("ExpoNotificationLifecycleListener", method + " : key = " + key + " = " + extra.get(key).toString());
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -373,6 +373,7 @@ export type NotificationContentIos = {
|
|
|
373
373
|
* The value your app uses to determine which scene to display to handle the notification.
|
|
374
374
|
*/
|
|
375
375
|
targetContentIdentifier?: string;
|
|
376
|
+
interruptionLevel?: 'passive' | 'active' | 'timeSensitive' | 'critical';
|
|
376
377
|
};
|
|
377
378
|
/**
|
|
378
379
|
* @platform ios
|
|
@@ -502,6 +503,7 @@ export type NotificationContentInput = {
|
|
|
502
503
|
* @platform ios
|
|
503
504
|
*/
|
|
504
505
|
attachments?: NotificationContentAttachmentIos[];
|
|
506
|
+
interruptionLevel?: 'passive' | 'active' | 'timeSensitive' | 'critical';
|
|
505
507
|
};
|
|
506
508
|
/**
|
|
507
509
|
* An object represents a notification request you can pass into `scheduleNotificationAsync`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notifications.types.d.ts","sourceRoot":"","sources":["../src/Notifications.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,k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;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE;QACV;;;WAGG;QACH,iBAAiB,EAAE,MAAM,CAAC;QAC1B;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF;;OAEG;IACH,OAAO,CAAC,EAAE;QACR;;;;WAIG;QACH,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB;;;WAGG;QACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;QACnC;;;;;WAKG;QACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;KAChC,CAAC;CACH;AAGD,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,OAAO,CAAC,EAAE,2BAA2B,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notifications.types.js","sourceRoot":"","sources":["../src/Notifications.types.ts"],"names":[],"mappings":"AAgWA;;GAEG;AACH,MAAM,CAAN,IAAY,2BAMX;AAND,WAAY,2BAA2B;IACrC,0CAAW,CAAA;IACX,0CAAW,CAAA;IACX,kDAAmB,CAAA;IACnB,4CAAa,CAAA;IACb,0CAAW,CAAA;AACb,CAAC,EANW,2BAA2B,KAA3B,2BAA2B,QAMtC","sourcesContent":["import type {\n PermissionExpiration,\n PermissionResponse,\n PermissionStatus,\n Subscription,\n} from 'expo-modules-core';\n\n/**\n * An object represents a notification delivered by a push notification system.\n *\n * On Android under `remoteMessage` field a JS version of the Firebase `RemoteMessage` may be accessed.\n * On iOS under `payload` you may find full contents of [`UNNotificationContent`'s](https://developer.apple.com/documentation/usernotifications/unnotificationcontent?language=objc) [`userInfo`](https://developer.apple.com/documentation/usernotifications/unnotificationcontent/1649869-userinfo?language=objc), for example [remote notification payload](https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html)\n * On web there is no extra data.\n */\nexport type PushNotificationTrigger = {\n type: 'push';\n /**\n * @platform ios\n */\n payload?: Record<string, unknown>;\n /**\n * @platform android\n */\n remoteMessage?: FirebaseRemoteMessage;\n};\n\n/**\n * A trigger related to a [`UNCalendarNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/uncalendarnotificationtrigger?language=objc).\n * @platform ios\n */\nexport interface CalendarNotificationTrigger {\n type: 'calendar';\n repeats: boolean;\n dateComponents: {\n era?: number;\n year?: number;\n month?: number;\n day?: number;\n hour?: number;\n minute?: number;\n second?: number;\n weekday?: number;\n weekdayOrdinal?: number;\n quarter?: number;\n weekOfMonth?: number;\n weekOfYear?: number;\n yearForWeekOfYear?: number;\n nanosecond?: number;\n isLeapMonth: boolean;\n timeZone?: string;\n calendar?: string;\n };\n}\n\n/**\n * The region used to determine when the system sends the notification.\n * @platform ios\n */\nexport interface Region {\n type: string;\n /**\n * The identifier for the region object.\n */\n identifier: string;\n /**\n * A Boolean indicating that notifications are generated upon entry into the region.\n */\n notifyOnEntry: boolean;\n /**\n * A Boolean indicating that notifications are generated upon exit from the region.\n */\n notifyOnExit: boolean;\n}\n\n/**\n * A circular geographic region, specified as a center point and radius. Based on Core Location [`CLCircularRegion`](https://developer.apple.com/documentation/corelocation/clcircularregion) class.\n * @platform ios\n */\nexport interface CircularRegion extends Region {\n type: 'circular';\n /**\n * The radius (measured in meters) that defines the geographic area’s outer boundary.\n */\n radius: number;\n /**\n * The center point of the geographic area.\n */\n center: {\n latitude: number;\n longitude: number;\n };\n}\n\n/**\n * A region used to detect the presence of iBeacon devices. Based on Core Location [`CLBeaconRegion`](https://developer.apple.com/documentation/corelocation/clbeaconregion) class.\n * @platform ios\n */\nexport interface BeaconRegion extends Region {\n type: 'beacon';\n /**\n * A Boolean value that indicates whether Core Location sends beacon notifications when the device’s display is on.\n */\n notifyEntryStateOnDisplay: boolean;\n /**\n * The major value from the beacon identity constraint that defines the beacon region.\n */\n major: number | null;\n /**\n * The minor value from the beacon identity constraint that defines the beacon region.\n */\n minor: number | null;\n /**\n * The UUID value from the beacon identity constraint that defines the beacon region.\n */\n uuid?: string;\n /**\n * The beacon identity constraint that defines the beacon region.\n */\n beaconIdentityConstraint?: {\n uuid: string;\n major: number | null;\n minor: number | null;\n };\n}\n\n/**\n * A trigger related to a [`UNLocationNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/unlocationnotificationtrigger?language=objc).\n * @platform ios\n */\nexport interface LocationNotificationTrigger {\n type: 'location';\n repeats: boolean;\n region: CircularRegion | BeaconRegion;\n}\n\n/**\n * A trigger related to an elapsed time interval. May be repeating (see `repeats` field).\n */\nexport interface TimeIntervalNotificationTrigger {\n type: 'timeInterval';\n repeats: boolean;\n seconds: number;\n}\n\n/**\n * A trigger related to a daily notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface DailyNotificationTrigger {\n type: 'daily';\n hour: number;\n minute: number;\n}\n\n/**\n * A trigger related to a weekly notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface WeeklyNotificationTrigger {\n type: 'weekly';\n weekday: number;\n hour: number;\n minute: number;\n}\n\n/**\n * A trigger related to a yearly notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface YearlyNotificationTrigger {\n type: 'yearly';\n day: number;\n month: number;\n hour: number;\n minute: number;\n}\n\n// @docsMissing\n/**\n * A Firebase `RemoteMessage` that caused the notification to be delivered to the app.\n */\nexport interface FirebaseRemoteMessage {\n collapseKey: string | null;\n data: Record<string, string>;\n from: string | null;\n messageId: string | null;\n messageType: string | null;\n originalPriority: number;\n priority: number;\n sentTime: number;\n to: string | null;\n ttl: number;\n notification: null | FirebaseRemoteMessageNotification;\n}\n\n// @docsMissing\nexport interface FirebaseRemoteMessageNotification {\n body: string | null;\n bodyLocalizationArgs: string[] | null;\n bodyLocalizationKey: string | null;\n channelId: string | null;\n clickAction: string | null;\n color: string | null;\n usesDefaultLightSettings: boolean;\n usesDefaultSound: boolean;\n usesDefaultVibrateSettings: boolean;\n eventTime: number | null;\n icon: string | null;\n imageUrl: string | null;\n lightSettings: number[] | null;\n link: string | null;\n localOnly: boolean;\n notificationCount: number | null;\n notificationPriority: number | null;\n sound: string | null;\n sticky: boolean;\n tag: string | null;\n ticker: string | null;\n title: string | null;\n titleLocalizationArgs: string[] | null;\n titleLocalizationKey: string | null;\n vibrateTimings: number[] | null;\n visibility: number | null;\n}\n\n/**\n * Represents a notification trigger that is unknown to `expo-notifications` and that it didn't know how to serialize for JS.\n */\nexport interface UnknownNotificationTrigger {\n type: 'unknown';\n}\n\n/**\n * A union type containing different triggers which may cause the notification to be delivered to the application.\n */\nexport type NotificationTrigger =\n | PushNotificationTrigger\n | CalendarNotificationTrigger\n | LocationNotificationTrigger\n | TimeIntervalNotificationTrigger\n | DailyNotificationTrigger\n | WeeklyNotificationTrigger\n | YearlyNotificationTrigger\n | UnknownNotificationTrigger;\n\n/**\n * A trigger that will cause the notification to be delivered immediately.\n */\nexport type ChannelAwareTriggerInput = {\n channelId: string;\n};\n\n// @docsMissing\nexport type CalendarTriggerInputValue = {\n timezone?: string;\n year?: number;\n month?: number;\n weekday?: number;\n weekOfMonth?: number;\n weekOfYear?: number;\n weekdayOrdinal?: number;\n day?: number;\n hour?: number;\n minute?: number;\n second?: number;\n};\n\n/**\n * A trigger that will cause the notification to be delivered once or many times when the date components match the specified values.\n * Corresponds to native [`UNCalendarNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/uncalendarnotificationtrigger?language=objc).\n * @platform ios\n */\nexport type CalendarTriggerInput = CalendarTriggerInputValue & {\n channelId?: string;\n repeats?: boolean;\n};\n\n/**\n * A trigger that will cause the notification to be delivered once or many times (depends on the `repeats` field) after `seconds` time elapse.\n * > **On iOS**, when `repeats` is `true`, the time interval must be 60 seconds or greater. Otherwise, the notification won't be triggered.\n */\nexport interface TimeIntervalTriggerInput {\n channelId?: string;\n repeats?: boolean;\n seconds: number;\n}\n\n/**\n * A trigger that will cause the notification to be delivered once per day.\n */\nexport interface DailyTriggerInput {\n channelId?: string;\n hour: number;\n minute: number;\n repeats: true;\n}\n\n/**\n * A trigger that will cause the notification to be delivered once every week.\n * > **Note:** Weekdays are specified with a number from `1` through `7`, with `1` indicating Sunday.\n */\nexport interface WeeklyTriggerInput {\n channelId?: string;\n weekday: number;\n hour: number;\n minute: number;\n repeats: true;\n}\n\n/**\n * A trigger that will cause the notification to be delivered once every year.\n * > **Note:** all properties are specified in JavaScript Date's ranges.\n */\nexport interface YearlyTriggerInput {\n channelId?: string;\n day: number;\n month: number;\n hour: number;\n minute: number;\n repeats: true;\n}\n\n/**\n * A trigger that will cause the notification to be delivered once at the specified `Date`.\n * If you pass in a `number` it will be interpreted as a Unix timestamp.\n */\nexport type DateTriggerInput = Date | number | { channelId?: string; date: Date | number };\n\n/**\n * A type represents time-based, schedulable triggers. For these triggers you can check the next trigger date\n * with [`getNextTriggerDateAsync`](#notificationsgetnexttriggerdateasynctrigger).\n */\nexport type SchedulableNotificationTriggerInput =\n | DateTriggerInput\n | TimeIntervalTriggerInput\n | DailyTriggerInput\n | WeeklyTriggerInput\n | YearlyTriggerInput\n | CalendarTriggerInput;\n\n/**\n * A type represents possible triggers with which you can schedule notifications.\n * A `null` trigger means that the notification should be scheduled for delivery immediately.\n */\nexport type NotificationTriggerInput =\n | null\n | ChannelAwareTriggerInput\n | SchedulableNotificationTriggerInput;\n\n/**\n * An enum corresponding to values appropriate for Android's [`Notification#priority`](https://developer.android.com/reference/android/app/Notification#priority) field.\n */\nexport enum AndroidNotificationPriority {\n MIN = 'min',\n LOW = 'low',\n DEFAULT = 'default',\n HIGH = 'high',\n MAX = 'max',\n}\n\n/**\n * An object represents notification's content.\n */\nexport type NotificationContent = {\n /**\n * Notification title - the bold text displayed above the rest of the content.\n */\n title: string | null;\n /**\n * On Android: `subText` - the display depends on the device.\n *\n * On iOS: `subtitle` - the bold text displayed between title and the rest of the content.\n */\n subtitle: string | null;\n /**\n * Notification body - the main content of the notification.\n */\n body: string | null;\n /**\n * Data associated with the notification, not displayed\n */\n data: Record<string, any>;\n // @docsMissing\n sound: 'default' | 'defaultCritical' | 'custom' | null;\n} & (NotificationContentIos | NotificationContentAndroid);\n\n/**\n * See [Apple documentation](https://developer.apple.com/documentation/usernotifications/unnotificationcontent?language=objc) for more information on specific fields.\n */\nexport type NotificationContentIos = {\n /**\n * The name of the image or storyboard to use when your app launches because of the notification.\n */\n launchImageName: string | null;\n /**\n * The number that your app’s icon displays.\n */\n badge: number | null;\n /**\n * The visual and audio attachments to display alongside the notification’s main content.\n */\n attachments: NotificationContentAttachmentIos[];\n /**\n * The text the system adds to the notification summary to provide additional context.\n */\n summaryArgument?: string | null;\n /**\n * The number the system adds to the notification summary when the notification represents multiple items.\n */\n summaryArgumentCount?: number;\n /**\n * The identifier of the notification’s category.\n */\n categoryIdentifier: string | null;\n /**\n * The identifier that groups related notifications.\n */\n threadIdentifier: string | null;\n /**\n * The value your app uses to determine which scene to display to handle the notification.\n */\n targetContentIdentifier?: string;\n};\n\n// @docsMissing\n/**\n * @platform ios\n */\nexport type NotificationContentAttachmentIos = {\n identifier: string | null;\n url: string | null;\n type: string | null;\n typeHint?: string;\n hideThumbnail?: boolean;\n thumbnailClipArea?: { x: number; y: number; width: number; height: number };\n thumbnailTime?: number;\n};\n\n/**\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification#fields) for more information on specific fields.\n */\nexport type NotificationContentAndroid = {\n /**\n * Application badge number associated with the notification.\n */\n badge?: number;\n /**\n * Accent color (in `#AARRGGBB` or `#RRGGBB` format) to be applied by the standard Style templates when presenting this notification.\n */\n color?: string;\n /**\n * Relative priority for this notification. Priority is an indication of how much of the user's valuable attention should be consumed by this notification.\n * Low-priority notifications may be hidden from the user in certain situations, while the user might be interrupted for a higher-priority notification.\n * The system will make a determination about how to interpret this priority when presenting the notification.\n */\n priority?: AndroidNotificationPriority;\n /**\n * The pattern with which to vibrate.\n */\n vibrationPattern?: number[];\n};\n\n/**\n * An object represents a request to present a notification. It has content — how it's being represented, and a trigger — what triggers the notification.\n * Many notifications ([`Notification`](#notification)) may be triggered with the same request (for example, a repeating notification).\n */\nexport interface NotificationRequest {\n identifier: string;\n content: NotificationContent;\n trigger: NotificationTrigger;\n}\n\n// TODO(simek): asses if we can base this type on `NotificationContent`, since most of the fields looks like repetition\n/**\n * An object represents notification content that you pass in to `presentNotificationAsync` or as a part of `NotificationRequestInput`.\n */\nexport type NotificationContentInput = {\n /**\n * Notification title - the bold text displayed above the rest of the content.\n */\n title?: string | null;\n /**\n * On Android: `subText` - the display depends on the device.\n *\n * On iOS: `subtitle` - the bold text displayed between title and the rest of the content.\n */\n subtitle?: string | null;\n /**\n * The main content of the notification.\n */\n body?: string | null;\n /**\n * Data associated with the notification, not displayed.\n */\n data?: Record<string, any>;\n /**\n * Application badge number associated with the notification.\n */\n badge?: number;\n sound?: boolean | string;\n /**\n * The name of the image or storyboard to use when your app launches because of the notification.\n */\n launchImageName?: string;\n /**\n * The pattern with which to vibrate.\n * @platform android\n */\n vibrate?: number[];\n /**\n * Relative priority for this notification. Priority is an indication of how much of the user's valuable attention should be consumed by this notification.\n * Low-priority notifications may be hidden from the user in certain situations, while the user might be interrupted for a higher-priority notification.\n * The system will make a determination about how to interpret this priority when presenting the notification.\n * @platform android\n */\n priority?: string;\n /**\n * Accent color (in `#AARRGGBB` or `#RRGGBB` format) to be applied by the standard Style templates when presenting this notification.\n * @platform android\n */\n color?: string;\n /**\n * If set to `false`, the notification will not be automatically dismissed when clicked.\n * The setting will be used when the value is not provided or is invalid is set to `true`, and the notification\n * will be dismissed automatically anyway. Corresponds directly to Android's `setAutoCancel` behavior.\n *\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification.Builder#setAutoCancel(boolean))\n * for more details.\n * @platform android\n */\n autoDismiss?: boolean;\n /**\n * The identifier of the notification’s category.\n * @platform ios\n */\n categoryIdentifier?: string;\n /**\n * If set to `true`, the notification cannot be dismissed by swipe. This setting defaults\n * to `false` if not provided or is invalid. Corresponds directly do Android's `isOngoing` behavior.\n * In Firebase terms this property of a notification is called `sticky`.\n *\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification.Builder#setOngoing(boolean))\n * and [Firebase documentation](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#AndroidNotification.FIELDS.sticky)\n * for more details.\n * @platform android\n */\n sticky?: boolean;\n /**\n * The visual and audio attachments to display alongside the notification’s main content.\n * @platform ios\n */\n attachments?: NotificationContentAttachmentIos[];\n};\n\n/**\n * An object represents a notification request you can pass into `scheduleNotificationAsync`.\n */\nexport interface NotificationRequestInput {\n identifier?: string;\n content: NotificationContentInput;\n trigger: NotificationTriggerInput;\n}\n\n/**\n * An object represents a single notification that has been triggered by some request ([`NotificationRequest`](#notificationrequest)) at some point in time.\n */\nexport interface Notification {\n date: number;\n request: NotificationRequest;\n}\n\n/**\n * An object represents user's interaction with the notification.\n * > **Note:** If the user taps on a notification `actionIdentifier` will be equal to [`Notifications.DEFAULT_ACTION_IDENTIFIER`](#notificationsdefault_action_identifier).\n */\nexport interface NotificationResponse {\n notification: Notification;\n actionIdentifier: string;\n userText?: string;\n}\n\n/**\n * An object represents behavior that should be applied to the incoming notification.\n * > On Android, setting `shouldPlaySound: false` will result in the drop-down notification alert **not** showing, no matter what the priority is.\n * > This setting will also override any channel-specific sounds you may have configured.\n */\nexport interface NotificationBehavior {\n shouldShowAlert: boolean;\n shouldPlaySound: boolean;\n shouldSetBadge: boolean;\n priority?: AndroidNotificationPriority;\n}\n\nexport interface NotificationAction {\n /**\n * A unique string that identifies this action. If a user takes this action (for example, selects this button in the system's Notification UI),\n * your app will receive this `actionIdentifier` via the [`NotificationResponseReceivedListener`](#addnotificationresponsereceivedlistenerlistener).\n */\n identifier: string;\n /**\n * The title of the button triggering this action.\n */\n buttonTitle: string;\n /**\n * Object which, if provided, will result in a button that prompts the user for a text response.\n */\n textInput?: {\n /**\n * A string which will be used as the title for the button used for submitting the text response.\n * @platform ios\n */\n submitButtonTitle: string;\n /**\n * A string that serves as a placeholder until the user begins typing. Defaults to no placeholder string.\n */\n placeholder: string;\n };\n /**\n * Object representing the additional configuration options.\n */\n options?: {\n /**\n * Boolean indicating whether the button title will be highlighted a different color (usually red).\n * This usually signifies a destructive action such as deleting data.\n * @platform ios\n */\n isDestructive?: boolean;\n /**\n * Boolean indicating whether triggering the action will require authentication from the user.\n * @platform ios\n */\n isAuthenticationRequired?: boolean;\n /**\n * Boolean indicating whether triggering this action foregrounds the app.\n * If `false` and your app is killed (not just backgrounded), [`NotificationResponseReceived` listeners](#addnotificationresponsereceivedlistenerlistener)\n * will not be triggered when a user selects this action.\n * @default true\n */\n opensAppToForeground?: boolean;\n };\n}\n\n// @docsMissing\nexport interface NotificationCategory {\n identifier: string;\n actions: NotificationAction[];\n options?: NotificationCategoryOptions;\n}\n\n/**\n * @platform ios\n */\nexport type NotificationCategoryOptions = {\n /**\n * Customizable placeholder for the notification preview text. This is shown if the user has disabled notification previews for the app.\n * Defaults to the localized iOS system default placeholder (`Notification`).\n */\n previewPlaceholder?: string;\n /**\n * Array of [Intent Class Identifiers](https://developer.apple.com/documentation/sirikit/intent_class_identifiers). When a notification is delivered,\n * the presence of an intent identifier lets the system know that the notification is potentially related to the handling of a request made through Siri.\n * @default []\n */\n intentIdentifiers?: string[];\n /**\n * A format string for the summary description used when the system groups the category’s notifications.\n */\n categorySummaryFormat?: string;\n /**\n * A boolean indicating whether to send actions for handling when the notification is dismissed (the user must explicitly dismiss\n * the notification interface - ignoring a notification or flicking away a notification banner does not trigger this action).\n * @default false\n */\n customDismissAction?: boolean;\n /**\n * A boolean indicating whether to allow CarPlay to display notifications of this type. **Apps must be approved for CarPlay to make use of this feature.**\n * @default false\n */\n allowInCarPlay?: boolean;\n /**\n * A boolean indicating whether to show the notification's title, even if the user has disabled notification previews for the app.\n * @default false\n */\n showTitle?: boolean;\n /**\n * A boolean indicating whether to show the notification's subtitle, even if the user has disabled notification previews for the app.\n * @default false\n */\n showSubtitle?: boolean;\n /**\n * A boolean indicating whether to allow notifications to be automatically read by Siri when the user is using AirPods.\n * @default false\n */\n allowAnnouncement?: boolean;\n};\n\nexport type { Subscription, PermissionResponse, PermissionStatus, PermissionExpiration };\n"]}
|
|
1
|
+
{"version":3,"file":"Notifications.types.js","sourceRoot":"","sources":["../src/Notifications.types.ts"],"names":[],"mappings":"AAgWA;;GAEG;AACH,MAAM,CAAN,IAAY,2BAMX;AAND,WAAY,2BAA2B;IACrC,0CAAW,CAAA;IACX,0CAAW,CAAA;IACX,kDAAmB,CAAA;IACnB,4CAAa,CAAA;IACb,0CAAW,CAAA;AACb,CAAC,EANW,2BAA2B,KAA3B,2BAA2B,QAMtC","sourcesContent":["import type {\n PermissionExpiration,\n PermissionResponse,\n PermissionStatus,\n Subscription,\n} from 'expo-modules-core';\n\n/**\n * An object represents a notification delivered by a push notification system.\n *\n * On Android under `remoteMessage` field a JS version of the Firebase `RemoteMessage` may be accessed.\n * On iOS under `payload` you may find full contents of [`UNNotificationContent`'s](https://developer.apple.com/documentation/usernotifications/unnotificationcontent?language=objc) [`userInfo`](https://developer.apple.com/documentation/usernotifications/unnotificationcontent/1649869-userinfo?language=objc), for example [remote notification payload](https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html)\n * On web there is no extra data.\n */\nexport type PushNotificationTrigger = {\n type: 'push';\n /**\n * @platform ios\n */\n payload?: Record<string, unknown>;\n /**\n * @platform android\n */\n remoteMessage?: FirebaseRemoteMessage;\n};\n\n/**\n * A trigger related to a [`UNCalendarNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/uncalendarnotificationtrigger?language=objc).\n * @platform ios\n */\nexport interface CalendarNotificationTrigger {\n type: 'calendar';\n repeats: boolean;\n dateComponents: {\n era?: number;\n year?: number;\n month?: number;\n day?: number;\n hour?: number;\n minute?: number;\n second?: number;\n weekday?: number;\n weekdayOrdinal?: number;\n quarter?: number;\n weekOfMonth?: number;\n weekOfYear?: number;\n yearForWeekOfYear?: number;\n nanosecond?: number;\n isLeapMonth: boolean;\n timeZone?: string;\n calendar?: string;\n };\n}\n\n/**\n * The region used to determine when the system sends the notification.\n * @platform ios\n */\nexport interface Region {\n type: string;\n /**\n * The identifier for the region object.\n */\n identifier: string;\n /**\n * A Boolean indicating that notifications are generated upon entry into the region.\n */\n notifyOnEntry: boolean;\n /**\n * A Boolean indicating that notifications are generated upon exit from the region.\n */\n notifyOnExit: boolean;\n}\n\n/**\n * A circular geographic region, specified as a center point and radius. Based on Core Location [`CLCircularRegion`](https://developer.apple.com/documentation/corelocation/clcircularregion) class.\n * @platform ios\n */\nexport interface CircularRegion extends Region {\n type: 'circular';\n /**\n * The radius (measured in meters) that defines the geographic area’s outer boundary.\n */\n radius: number;\n /**\n * The center point of the geographic area.\n */\n center: {\n latitude: number;\n longitude: number;\n };\n}\n\n/**\n * A region used to detect the presence of iBeacon devices. Based on Core Location [`CLBeaconRegion`](https://developer.apple.com/documentation/corelocation/clbeaconregion) class.\n * @platform ios\n */\nexport interface BeaconRegion extends Region {\n type: 'beacon';\n /**\n * A Boolean value that indicates whether Core Location sends beacon notifications when the device’s display is on.\n */\n notifyEntryStateOnDisplay: boolean;\n /**\n * The major value from the beacon identity constraint that defines the beacon region.\n */\n major: number | null;\n /**\n * The minor value from the beacon identity constraint that defines the beacon region.\n */\n minor: number | null;\n /**\n * The UUID value from the beacon identity constraint that defines the beacon region.\n */\n uuid?: string;\n /**\n * The beacon identity constraint that defines the beacon region.\n */\n beaconIdentityConstraint?: {\n uuid: string;\n major: number | null;\n minor: number | null;\n };\n}\n\n/**\n * A trigger related to a [`UNLocationNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/unlocationnotificationtrigger?language=objc).\n * @platform ios\n */\nexport interface LocationNotificationTrigger {\n type: 'location';\n repeats: boolean;\n region: CircularRegion | BeaconRegion;\n}\n\n/**\n * A trigger related to an elapsed time interval. May be repeating (see `repeats` field).\n */\nexport interface TimeIntervalNotificationTrigger {\n type: 'timeInterval';\n repeats: boolean;\n seconds: number;\n}\n\n/**\n * A trigger related to a daily notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface DailyNotificationTrigger {\n type: 'daily';\n hour: number;\n minute: number;\n}\n\n/**\n * A trigger related to a weekly notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface WeeklyNotificationTrigger {\n type: 'weekly';\n weekday: number;\n hour: number;\n minute: number;\n}\n\n/**\n * A trigger related to a yearly notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface YearlyNotificationTrigger {\n type: 'yearly';\n day: number;\n month: number;\n hour: number;\n minute: number;\n}\n\n// @docsMissing\n/**\n * A Firebase `RemoteMessage` that caused the notification to be delivered to the app.\n */\nexport interface FirebaseRemoteMessage {\n collapseKey: string | null;\n data: Record<string, string>;\n from: string | null;\n messageId: string | null;\n messageType: string | null;\n originalPriority: number;\n priority: number;\n sentTime: number;\n to: string | null;\n ttl: number;\n notification: null | FirebaseRemoteMessageNotification;\n}\n\n// @docsMissing\nexport interface FirebaseRemoteMessageNotification {\n body: string | null;\n bodyLocalizationArgs: string[] | null;\n bodyLocalizationKey: string | null;\n channelId: string | null;\n clickAction: string | null;\n color: string | null;\n usesDefaultLightSettings: boolean;\n usesDefaultSound: boolean;\n usesDefaultVibrateSettings: boolean;\n eventTime: number | null;\n icon: string | null;\n imageUrl: string | null;\n lightSettings: number[] | null;\n link: string | null;\n localOnly: boolean;\n notificationCount: number | null;\n notificationPriority: number | null;\n sound: string | null;\n sticky: boolean;\n tag: string | null;\n ticker: string | null;\n title: string | null;\n titleLocalizationArgs: string[] | null;\n titleLocalizationKey: string | null;\n vibrateTimings: number[] | null;\n visibility: number | null;\n}\n\n/**\n * Represents a notification trigger that is unknown to `expo-notifications` and that it didn't know how to serialize for JS.\n */\nexport interface UnknownNotificationTrigger {\n type: 'unknown';\n}\n\n/**\n * A union type containing different triggers which may cause the notification to be delivered to the application.\n */\nexport type NotificationTrigger =\n | PushNotificationTrigger\n | CalendarNotificationTrigger\n | LocationNotificationTrigger\n | TimeIntervalNotificationTrigger\n | DailyNotificationTrigger\n | WeeklyNotificationTrigger\n | YearlyNotificationTrigger\n | UnknownNotificationTrigger;\n\n/**\n * A trigger that will cause the notification to be delivered immediately.\n */\nexport type ChannelAwareTriggerInput = {\n channelId: string;\n};\n\n// @docsMissing\nexport type CalendarTriggerInputValue = {\n timezone?: string;\n year?: number;\n month?: number;\n weekday?: number;\n weekOfMonth?: number;\n weekOfYear?: number;\n weekdayOrdinal?: number;\n day?: number;\n hour?: number;\n minute?: number;\n second?: number;\n};\n\n/**\n * A trigger that will cause the notification to be delivered once or many times when the date components match the specified values.\n * Corresponds to native [`UNCalendarNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/uncalendarnotificationtrigger?language=objc).\n * @platform ios\n */\nexport type CalendarTriggerInput = CalendarTriggerInputValue & {\n channelId?: string;\n repeats?: boolean;\n};\n\n/**\n * A trigger that will cause the notification to be delivered once or many times (depends on the `repeats` field) after `seconds` time elapse.\n * > **On iOS**, when `repeats` is `true`, the time interval must be 60 seconds or greater. Otherwise, the notification won't be triggered.\n */\nexport interface TimeIntervalTriggerInput {\n channelId?: string;\n repeats?: boolean;\n seconds: number;\n}\n\n/**\n * A trigger that will cause the notification to be delivered once per day.\n */\nexport interface DailyTriggerInput {\n channelId?: string;\n hour: number;\n minute: number;\n repeats: true;\n}\n\n/**\n * A trigger that will cause the notification to be delivered once every week.\n * > **Note:** Weekdays are specified with a number from `1` through `7`, with `1` indicating Sunday.\n */\nexport interface WeeklyTriggerInput {\n channelId?: string;\n weekday: number;\n hour: number;\n minute: number;\n repeats: true;\n}\n\n/**\n * A trigger that will cause the notification to be delivered once every year.\n * > **Note:** all properties are specified in JavaScript Date's ranges.\n */\nexport interface YearlyTriggerInput {\n channelId?: string;\n day: number;\n month: number;\n hour: number;\n minute: number;\n repeats: true;\n}\n\n/**\n * A trigger that will cause the notification to be delivered once at the specified `Date`.\n * If you pass in a `number` it will be interpreted as a Unix timestamp.\n */\nexport type DateTriggerInput = Date | number | { channelId?: string; date: Date | number };\n\n/**\n * A type represents time-based, schedulable triggers. For these triggers you can check the next trigger date\n * with [`getNextTriggerDateAsync`](#notificationsgetnexttriggerdateasynctrigger).\n */\nexport type SchedulableNotificationTriggerInput =\n | DateTriggerInput\n | TimeIntervalTriggerInput\n | DailyTriggerInput\n | WeeklyTriggerInput\n | YearlyTriggerInput\n | CalendarTriggerInput;\n\n/**\n * A type represents possible triggers with which you can schedule notifications.\n * A `null` trigger means that the notification should be scheduled for delivery immediately.\n */\nexport type NotificationTriggerInput =\n | null\n | ChannelAwareTriggerInput\n | SchedulableNotificationTriggerInput;\n\n/**\n * An enum corresponding to values appropriate for Android's [`Notification#priority`](https://developer.android.com/reference/android/app/Notification#priority) field.\n */\nexport enum AndroidNotificationPriority {\n MIN = 'min',\n LOW = 'low',\n DEFAULT = 'default',\n HIGH = 'high',\n MAX = 'max',\n}\n\n/**\n * An object represents notification's content.\n */\nexport type NotificationContent = {\n /**\n * Notification title - the bold text displayed above the rest of the content.\n */\n title: string | null;\n /**\n * On Android: `subText` - the display depends on the device.\n *\n * On iOS: `subtitle` - the bold text displayed between title and the rest of the content.\n */\n subtitle: string | null;\n /**\n * Notification body - the main content of the notification.\n */\n body: string | null;\n /**\n * Data associated with the notification, not displayed\n */\n data: Record<string, any>;\n // @docsMissing\n sound: 'default' | 'defaultCritical' | 'custom' | null;\n} & (NotificationContentIos | NotificationContentAndroid);\n\n/**\n * See [Apple documentation](https://developer.apple.com/documentation/usernotifications/unnotificationcontent?language=objc) for more information on specific fields.\n */\nexport type NotificationContentIos = {\n /**\n * The name of the image or storyboard to use when your app launches because of the notification.\n */\n launchImageName: string | null;\n /**\n * The number that your app’s icon displays.\n */\n badge: number | null;\n /**\n * The visual and audio attachments to display alongside the notification’s main content.\n */\n attachments: NotificationContentAttachmentIos[];\n /**\n * The text the system adds to the notification summary to provide additional context.\n */\n summaryArgument?: string | null;\n /**\n * The number the system adds to the notification summary when the notification represents multiple items.\n */\n summaryArgumentCount?: number;\n /**\n * The identifier of the notification’s category.\n */\n categoryIdentifier: string | null;\n /**\n * The identifier that groups related notifications.\n */\n threadIdentifier: string | null;\n /**\n * The value your app uses to determine which scene to display to handle the notification.\n */\n targetContentIdentifier?: string;\n /*\n * The notification’s importance and required delivery timing.\n * Posible values:\n * - 'passive' - the system adds the notification to the notification list without lighting up the screen or playing a sound\n * - 'active' - the system presents the notification immediately, lights up the screen, and can play a sound\n * - 'timeSensitive' - The system presents the notification immediately, lights up the screen, can play a sound, and breaks through system notification controls\n * - 'critical - the system presents the notification immediately, lights up the screen, and bypasses the mute switch to play a sound\n * @platform ios 15+\n */\n interruptionLevel?: 'passive' | 'active' | 'timeSensitive' | 'critical';\n};\n\n// @docsMissing\n/**\n * @platform ios\n */\nexport type NotificationContentAttachmentIos = {\n identifier: string | null;\n url: string | null;\n type: string | null;\n typeHint?: string;\n hideThumbnail?: boolean;\n thumbnailClipArea?: { x: number; y: number; width: number; height: number };\n thumbnailTime?: number;\n};\n\n/**\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification#fields) for more information on specific fields.\n */\nexport type NotificationContentAndroid = {\n /**\n * Application badge number associated with the notification.\n */\n badge?: number;\n /**\n * Accent color (in `#AARRGGBB` or `#RRGGBB` format) to be applied by the standard Style templates when presenting this notification.\n */\n color?: string;\n /**\n * Relative priority for this notification. Priority is an indication of how much of the user's valuable attention should be consumed by this notification.\n * Low-priority notifications may be hidden from the user in certain situations, while the user might be interrupted for a higher-priority notification.\n * The system will make a determination about how to interpret this priority when presenting the notification.\n */\n priority?: AndroidNotificationPriority;\n /**\n * The pattern with which to vibrate.\n */\n vibrationPattern?: number[];\n};\n\n/**\n * An object represents a request to present a notification. It has content — how it's being represented, and a trigger — what triggers the notification.\n * Many notifications ([`Notification`](#notification)) may be triggered with the same request (for example, a repeating notification).\n */\nexport interface NotificationRequest {\n identifier: string;\n content: NotificationContent;\n trigger: NotificationTrigger;\n}\n\n// TODO(simek): asses if we can base this type on `NotificationContent`, since most of the fields looks like repetition\n/**\n * An object represents notification content that you pass in to `presentNotificationAsync` or as a part of `NotificationRequestInput`.\n */\nexport type NotificationContentInput = {\n /**\n * Notification title - the bold text displayed above the rest of the content.\n */\n title?: string | null;\n /**\n * On Android: `subText` - the display depends on the device.\n *\n * On iOS: `subtitle` - the bold text displayed between title and the rest of the content.\n */\n subtitle?: string | null;\n /**\n * The main content of the notification.\n */\n body?: string | null;\n /**\n * Data associated with the notification, not displayed.\n */\n data?: Record<string, any>;\n /**\n * Application badge number associated with the notification.\n */\n badge?: number;\n sound?: boolean | string;\n /**\n * The name of the image or storyboard to use when your app launches because of the notification.\n */\n launchImageName?: string;\n /**\n * The pattern with which to vibrate.\n * @platform android\n */\n vibrate?: number[];\n /**\n * Relative priority for this notification. Priority is an indication of how much of the user's valuable attention should be consumed by this notification.\n * Low-priority notifications may be hidden from the user in certain situations, while the user might be interrupted for a higher-priority notification.\n * The system will make a determination about how to interpret this priority when presenting the notification.\n * @platform android\n */\n priority?: string;\n /**\n * Accent color (in `#AARRGGBB` or `#RRGGBB` format) to be applied by the standard Style templates when presenting this notification.\n * @platform android\n */\n color?: string;\n /**\n * If set to `false`, the notification will not be automatically dismissed when clicked.\n * The setting will be used when the value is not provided or is invalid is set to `true`, and the notification\n * will be dismissed automatically anyway. Corresponds directly to Android's `setAutoCancel` behavior.\n *\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification.Builder#setAutoCancel(boolean))\n * for more details.\n * @platform android\n */\n autoDismiss?: boolean;\n /**\n * The identifier of the notification’s category.\n * @platform ios\n */\n categoryIdentifier?: string;\n /**\n * If set to `true`, the notification cannot be dismissed by swipe. This setting defaults\n * to `false` if not provided or is invalid. Corresponds directly do Android's `isOngoing` behavior.\n * In Firebase terms this property of a notification is called `sticky`.\n *\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification.Builder#setOngoing(boolean))\n * and [Firebase documentation](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#AndroidNotification.FIELDS.sticky)\n * for more details.\n * @platform android\n */\n sticky?: boolean;\n /**\n * The visual and audio attachments to display alongside the notification’s main content.\n * @platform ios\n */\n attachments?: NotificationContentAttachmentIos[];\n /*\n * The notification’s importance and required delivery timing.\n * Posible values:\n * - 'passive' - the system adds the notification to the notification list without lighting up the screen or playing a sound\n * - 'active' - the system presents the notification immediately, lights up the screen, and can play a sound\n * - 'timeSensitive' - The system presents the notification immediately, lights up the screen, can play a sound, and breaks through system notification controls\n * - 'critical - the system presents the notification immediately, lights up the screen, and bypasses the mute switch to play a sound\n * @platform ios 15+\n */\n interruptionLevel?: 'passive' | 'active' | 'timeSensitive' | 'critical';\n};\n\n/**\n * An object represents a notification request you can pass into `scheduleNotificationAsync`.\n */\nexport interface NotificationRequestInput {\n identifier?: string;\n content: NotificationContentInput;\n trigger: NotificationTriggerInput;\n}\n\n/**\n * An object represents a single notification that has been triggered by some request ([`NotificationRequest`](#notificationrequest)) at some point in time.\n */\nexport interface Notification {\n date: number;\n request: NotificationRequest;\n}\n\n/**\n * An object represents user's interaction with the notification.\n * > **Note:** If the user taps on a notification `actionIdentifier` will be equal to [`Notifications.DEFAULT_ACTION_IDENTIFIER`](#notificationsdefault_action_identifier).\n */\nexport interface NotificationResponse {\n notification: Notification;\n actionIdentifier: string;\n userText?: string;\n}\n\n/**\n * An object represents behavior that should be applied to the incoming notification.\n * > On Android, setting `shouldPlaySound: false` will result in the drop-down notification alert **not** showing, no matter what the priority is.\n * > This setting will also override any channel-specific sounds you may have configured.\n */\nexport interface NotificationBehavior {\n shouldShowAlert: boolean;\n shouldPlaySound: boolean;\n shouldSetBadge: boolean;\n priority?: AndroidNotificationPriority;\n}\n\nexport interface NotificationAction {\n /**\n * A unique string that identifies this action. If a user takes this action (for example, selects this button in the system's Notification UI),\n * your app will receive this `actionIdentifier` via the [`NotificationResponseReceivedListener`](#addnotificationresponsereceivedlistenerlistener).\n */\n identifier: string;\n /**\n * The title of the button triggering this action.\n */\n buttonTitle: string;\n /**\n * Object which, if provided, will result in a button that prompts the user for a text response.\n */\n textInput?: {\n /**\n * A string which will be used as the title for the button used for submitting the text response.\n * @platform ios\n */\n submitButtonTitle: string;\n /**\n * A string that serves as a placeholder until the user begins typing. Defaults to no placeholder string.\n */\n placeholder: string;\n };\n /**\n * Object representing the additional configuration options.\n */\n options?: {\n /**\n * Boolean indicating whether the button title will be highlighted a different color (usually red).\n * This usually signifies a destructive action such as deleting data.\n * @platform ios\n */\n isDestructive?: boolean;\n /**\n * Boolean indicating whether triggering the action will require authentication from the user.\n * @platform ios\n */\n isAuthenticationRequired?: boolean;\n /**\n * Boolean indicating whether triggering this action foregrounds the app.\n * If `false` and your app is killed (not just backgrounded), [`NotificationResponseReceived` listeners](#addnotificationresponsereceivedlistenerlistener)\n * will not be triggered when a user selects this action.\n * @default true\n */\n opensAppToForeground?: boolean;\n };\n}\n\n// @docsMissing\nexport interface NotificationCategory {\n identifier: string;\n actions: NotificationAction[];\n options?: NotificationCategoryOptions;\n}\n\n/**\n * @platform ios\n */\nexport type NotificationCategoryOptions = {\n /**\n * Customizable placeholder for the notification preview text. This is shown if the user has disabled notification previews for the app.\n * Defaults to the localized iOS system default placeholder (`Notification`).\n */\n previewPlaceholder?: string;\n /**\n * Array of [Intent Class Identifiers](https://developer.apple.com/documentation/sirikit/intent_class_identifiers). When a notification is delivered,\n * the presence of an intent identifier lets the system know that the notification is potentially related to the handling of a request made through Siri.\n * @default []\n */\n intentIdentifiers?: string[];\n /**\n * A format string for the summary description used when the system groups the category’s notifications.\n */\n categorySummaryFormat?: string;\n /**\n * A boolean indicating whether to send actions for handling when the notification is dismissed (the user must explicitly dismiss\n * the notification interface - ignoring a notification or flicking away a notification banner does not trigger this action).\n * @default false\n */\n customDismissAction?: boolean;\n /**\n * A boolean indicating whether to allow CarPlay to display notifications of this type. **Apps must be approved for CarPlay to make use of this feature.**\n * @default false\n */\n allowInCarPlay?: boolean;\n /**\n * A boolean indicating whether to show the notification's title, even if the user has disabled notification previews for the app.\n * @default false\n */\n showTitle?: boolean;\n /**\n * A boolean indicating whether to show the notification's subtitle, even if the user has disabled notification previews for the app.\n * @default false\n */\n showSubtitle?: boolean;\n /**\n * A boolean indicating whether to allow notifications to be automatically read by Siri when the user is using AirPods.\n * @default false\n */\n allowAnnouncement?: boolean;\n};\n\nexport type { Subscription, PermissionResponse, PermissionStatus, PermissionExpiration };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsEmitter.d.ts","sourceRoot":"","sources":["../src/NotificationsEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,YAAY,EAAuB,MAAM,mBAAmB,CAAC;AAEpF,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAW3E,eAAO,MAAM,yBAAyB,+CAA+C,CAAC;AAEtF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,GACtC,YAAY,CAEd;AAED;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,YAAY,CAElF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,uCAAuC,CACrD,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,GAC9C,YAAY,
|
|
1
|
+
{"version":3,"file":"NotificationsEmitter.d.ts","sourceRoot":"","sources":["../src/NotificationsEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,YAAY,EAAuB,MAAM,mBAAmB,CAAC;AAEpF,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAW3E,eAAO,MAAM,yBAAyB,+CAA+C,CAAC;AAEtF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,GACtC,YAAY,CAEd;AAED;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,YAAY,CAElF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,uCAAuC,CACrD,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,GAC9C,YAAY,CAoBd;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,YAAY,EAAE,YAAY,QAExE;AAGD;;GAEG;AACH,wBAAsB,gCAAgC,IAAI,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAK7F"}
|
|
@@ -72,7 +72,21 @@ export function addNotificationsDroppedListener(listener) {
|
|
|
72
72
|
* @header listen
|
|
73
73
|
*/
|
|
74
74
|
export function addNotificationResponseReceivedListener(listener) {
|
|
75
|
-
return emitter.addListener(didReceiveNotificationResponseEventName,
|
|
75
|
+
return emitter.addListener(didReceiveNotificationResponseEventName, (response) => {
|
|
76
|
+
const mappedResponse = { ...response };
|
|
77
|
+
try {
|
|
78
|
+
const dataString = mappedResponse?.notification?.request?.content['dataString'];
|
|
79
|
+
if (typeof dataString === 'string') {
|
|
80
|
+
mappedResponse.notification.request.content.data = JSON.parse(dataString);
|
|
81
|
+
delete mappedResponse.notification.request.content.dataString;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
catch (e) {
|
|
85
|
+
console.log(`Error in response: ${e}`);
|
|
86
|
+
}
|
|
87
|
+
console.log(`response received: ${JSON.stringify(mappedResponse, null, 2)}`);
|
|
88
|
+
listener(mappedResponse);
|
|
89
|
+
});
|
|
76
90
|
}
|
|
77
91
|
/**
|
|
78
92
|
* Removes a notification subscription returned by an `addNotificationListener` call.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsEmitter.js","sourceRoot":"","sources":["../src/NotificationsEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAgB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGpF,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AAEtE,iCAAiC;AACjC,MAAM,OAAO,GAAG,IAAI,YAAY,CAAC,0BAA0B,CAAC,CAAC;AAE7D,MAAM,+BAA+B,GAAG,0BAA0B,CAAC;AACnE,MAAM,6BAA6B,GAAG,wBAAwB,CAAC;AAC/D,MAAM,uCAAuC,GAAG,kCAAkC,CAAC;AAEnF,eAAe;AACf,MAAM,CAAC,MAAM,yBAAyB,GAAG,4CAA4C,CAAC;AAEtF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,+BAA+B,CAC7C,QAAuC;IAEvC,OAAO,OAAO,CAAC,WAAW,CAAe,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A8B,EAAE,EAAE;QACjC,MAAM,cAAc,GAEhB,EAAE,GAAG,QAAQ,EAAE,CAAC;QACpB,IAAI;YACF,MAAM,UAAU,GAAG,cAAc,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;YAChF,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;gBAClC,cAAc,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;gBAC1E,OAAO,cAAc,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC;aAC/D;SACF;QAAC,OAAO,CAAM,EAAE;YACf,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC;SACxC;QACD,OAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QAC7E,QAAQ,CAAC,cAAc,CAAC,CAAC;IAC3B,CAAC,CACF,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,8BAA8B,CAAC,YAA0B;IACvE,OAAO,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;AAC3C,CAAC;AAED,eAAe;AACf;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gCAAgC;IACpD,IAAI,CAAC,0BAA0B,CAAC,gCAAgC,EAAE;QAChE,MAAM,IAAI,mBAAmB,CAAC,mBAAmB,EAAE,kCAAkC,CAAC,CAAC;KACxF;IACD,OAAO,MAAM,0BAA0B,CAAC,gCAAgC,EAAE,CAAC;AAC7E,CAAC","sourcesContent":["import { EventEmitter, Subscription, UnavailabilityError } from 'expo-modules-core';\n\nimport { Notification, NotificationResponse } from './Notifications.types';\nimport NotificationsEmitterModule from './NotificationsEmitterModule';\n\n// Web uses SyntheticEventEmitter\nconst emitter = new EventEmitter(NotificationsEmitterModule);\n\nconst didReceiveNotificationEventName = 'onDidReceiveNotification';\nconst didDropNotificationsEventName = 'onNotificationsDeleted';\nconst didReceiveNotificationResponseEventName = 'onDidReceiveNotificationResponse';\n\n// @docsMissing\nexport const DEFAULT_ACTION_IDENTIFIER = 'expo.modules.notifications.actions.DEFAULT';\n\n/**\n * Listeners registered by this method will be called whenever a notification is received while the app is running.\n * @param listener A function accepting a notification ([`Notification`](#notification)) as an argument.\n * @return A [`Subscription`](#subscription) object represents the subscription of the provided listener.\n * @example Registering a notification listener using a React hook:\n * ```jsx\n * import React from 'react';\n * import * as Notifications from 'expo-notifications';\n *\n * export default function App() {\n * React.useEffect(() => {\n * const subscription = Notifications.addNotificationReceivedListener(notification => {\n * console.log(notification);\n * });\n * return () => subscription.remove();\n * }, []);\n *\n * return (\n * // Your app content\n * );\n * }\n * ```\n * @header listen\n */\nexport function addNotificationReceivedListener(\n listener: (event: Notification) => void\n): Subscription {\n return emitter.addListener<Notification>(didReceiveNotificationEventName, listener);\n}\n\n/**\n * Listeners registered by this method will be called whenever some notifications have been dropped by the server.\n * Applicable only to Firebase Cloud Messaging which we use as a notifications service on Android. It corresponds to `onDeletedMessages()` callback.\n * More information can be found in [Firebase docs](https://firebase.google.com/docs/cloud-messaging/android/receive#override-ondeletedmessages).\n * @param listener A callback function.\n * @return A [`Subscription`](#subscription) object represents the subscription of the provided listener.\n * @header listen\n */\nexport function addNotificationsDroppedListener(listener: () => void): Subscription {\n return emitter.addListener<void>(didDropNotificationsEventName, listener);\n}\n\n/**\n * Listeners registered by this method will be called whenever a user interacts with a notification (for example, taps on it).\n * @param listener A function accepting notification response ([`NotificationResponse`](#notificationresponse)) as an argument.\n * @return A [`Subscription`](#subscription) object represents the subscription of the provided listener.\n * @example Register a notification responder listener:\n * ```jsx\n * import React from 'react';\n * import { Linking } from 'react-native';\n * import * as Notifications from 'expo-notifications';\n *\n * export default function Container() {\n * React.useEffect(() => {\n * const subscription = Notifications.addNotificationResponseReceivedListener(response => {\n * const url = response.notification.request.content.data.url;\n * Linking.openURL(url);\n * });\n * return () => subscription.remove();\n * }, []);\n *\n * return (\n * // Your app content\n * );\n * }\n * ```\n * @header listen\n */\nexport function addNotificationResponseReceivedListener(\n listener: (event: NotificationResponse) => void\n): Subscription {\n return emitter.addListener<NotificationResponse>(\n didReceiveNotificationResponseEventName,\n (response: NotificationResponse) => {\n const mappedResponse: NotificationResponse & {\n notification: { request: { content: { dataString?: string } } };\n } = { ...response };\n try {\n const dataString = mappedResponse?.notification?.request?.content['dataString'];\n if (typeof dataString === 'string') {\n mappedResponse.notification.request.content.data = JSON.parse(dataString);\n delete mappedResponse.notification.request.content.dataString;\n }\n } catch (e: any) {\n console.log(`Error in response: ${e}`);\n }\n console.log(`response received: ${JSON.stringify(mappedResponse, null, 2)}`);\n listener(mappedResponse);\n }\n );\n}\n\n/**\n * Removes a notification subscription returned by an `addNotificationListener` call.\n * @param subscription A subscription returned by `addNotificationListener` method.\n * @header listen\n */\nexport function removeNotificationSubscription(subscription: Subscription) {\n emitter.removeSubscription(subscription);\n}\n\n// @docsMissing\n/**\n * @header listen\n */\nexport async function getLastNotificationResponseAsync(): Promise<NotificationResponse | null> {\n if (!NotificationsEmitterModule.getLastNotificationResponseAsync) {\n throw new UnavailabilityError('ExpoNotifications', 'getLastNotificationResponseAsync');\n }\n return await NotificationsEmitterModule.getLastNotificationResponseAsync();\n}\n"]}
|
|
@@ -47,9 +47,29 @@ EX_REGISTER_MODULE();
|
|
|
47
47
|
}
|
|
48
48
|
}];
|
|
49
49
|
[content setAttachments:attachments];
|
|
50
|
+
if (@available(iOS 15.0, *)) {
|
|
51
|
+
NSString *interruptionLevel = [request objectForKey:@"interruptionLevel" verifyingClass:[NSString class]];
|
|
52
|
+
if (interruptionLevel) {
|
|
53
|
+
content.interruptionLevel = [EXNotificationBuilder deserializeInterruptionLevel:interruptionLevel];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
50
56
|
return content;
|
|
51
57
|
}
|
|
52
58
|
|
|
59
|
+
+ (UNNotificationInterruptionLevel)deserializeInterruptionLevel:(NSString *)interruptionLevel API_AVAILABLE(ios(15.0)) {
|
|
60
|
+
static NSDictionary *interruptionLevelMap;
|
|
61
|
+
if (!interruptionLevelMap) {
|
|
62
|
+
interruptionLevelMap = @{
|
|
63
|
+
@"passive": @(UNNotificationInterruptionLevelPassive),
|
|
64
|
+
@"active": @(UNNotificationInterruptionLevelActive),
|
|
65
|
+
@"timeSensitive": @(UNNotificationInterruptionLevelTimeSensitive),
|
|
66
|
+
@"critical": @(UNNotificationInterruptionLevelCritical)
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return [interruptionLevelMap[interruptionLevel] integerValue];
|
|
71
|
+
}
|
|
72
|
+
|
|
53
73
|
- (UNNotificationAttachment *)attachmentFromRequest:(NSDictionary *)request
|
|
54
74
|
{
|
|
55
75
|
NSString *identifier = [request objectForKey:@"identifier" verifyingClass:[NSString class]] ?: @"";
|
|
@@ -64,10 +64,27 @@ static NSString * const EXNotificationResponseDefaultActionIdentifier = @"expo.m
|
|
|
64
64
|
if (@available(iOS 13.0, *)) {
|
|
65
65
|
serializedContent[@"targetContentIdentifier"] = content.targetContentIdentifier ?: [NSNull null];
|
|
66
66
|
}
|
|
67
|
+
if (@available(iOS 15.0, *)) {
|
|
68
|
+
serializedContent[@"interruptionLevel"] = [EXNotificationSerializer serializedInterruptionLevel:content.interruptionLevel];
|
|
69
|
+
}
|
|
67
70
|
|
|
68
71
|
return serializedContent;
|
|
69
72
|
}
|
|
70
73
|
|
|
74
|
+
+ (NSString *)serializedInterruptionLevel:(UNNotificationInterruptionLevel)interruptionLevel API_AVAILABLE(ios(15.0)) {
|
|
75
|
+
static NSDictionary<NSNumber *, NSString *> *interruptionLevelMap;
|
|
76
|
+
if (!interruptionLevelMap) {
|
|
77
|
+
interruptionLevelMap = @{
|
|
78
|
+
@(UNNotificationInterruptionLevelPassive): @"passive",
|
|
79
|
+
@(UNNotificationInterruptionLevelActive): @"active",
|
|
80
|
+
@(UNNotificationInterruptionLevelTimeSensitive): @"timeSensitive",
|
|
81
|
+
@(UNNotificationInterruptionLevelCritical): @"critical"
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return [interruptionLevelMap objectForKey:@(interruptionLevel)];
|
|
86
|
+
}
|
|
87
|
+
|
|
71
88
|
+ (NSDictionary *)serializedNotificationData:(UNNotificationRequest *)request
|
|
72
89
|
{
|
|
73
90
|
BOOL isRemote = [request.trigger isKindOfClass:[UNPushNotificationTrigger class]];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-notifications",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.3",
|
|
4
4
|
"description": "Notifications module",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"expo": "*"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "d6515f12fc9eee6d563cc4de32f9aee5c856158f"
|
|
59
59
|
}
|
|
@@ -423,6 +423,16 @@ export type NotificationContentIos = {
|
|
|
423
423
|
* The value your app uses to determine which scene to display to handle the notification.
|
|
424
424
|
*/
|
|
425
425
|
targetContentIdentifier?: string;
|
|
426
|
+
/*
|
|
427
|
+
* The notification’s importance and required delivery timing.
|
|
428
|
+
* Posible values:
|
|
429
|
+
* - 'passive' - the system adds the notification to the notification list without lighting up the screen or playing a sound
|
|
430
|
+
* - 'active' - the system presents the notification immediately, lights up the screen, and can play a sound
|
|
431
|
+
* - 'timeSensitive' - The system presents the notification immediately, lights up the screen, can play a sound, and breaks through system notification controls
|
|
432
|
+
* - 'critical - the system presents the notification immediately, lights up the screen, and bypasses the mute switch to play a sound
|
|
433
|
+
* @platform ios 15+
|
|
434
|
+
*/
|
|
435
|
+
interruptionLevel?: 'passive' | 'active' | 'timeSensitive' | 'critical';
|
|
426
436
|
};
|
|
427
437
|
|
|
428
438
|
// @docsMissing
|
|
@@ -553,6 +563,16 @@ export type NotificationContentInput = {
|
|
|
553
563
|
* @platform ios
|
|
554
564
|
*/
|
|
555
565
|
attachments?: NotificationContentAttachmentIos[];
|
|
566
|
+
/*
|
|
567
|
+
* The notification’s importance and required delivery timing.
|
|
568
|
+
* Posible values:
|
|
569
|
+
* - 'passive' - the system adds the notification to the notification list without lighting up the screen or playing a sound
|
|
570
|
+
* - 'active' - the system presents the notification immediately, lights up the screen, and can play a sound
|
|
571
|
+
* - 'timeSensitive' - The system presents the notification immediately, lights up the screen, can play a sound, and breaks through system notification controls
|
|
572
|
+
* - 'critical - the system presents the notification immediately, lights up the screen, and bypasses the mute switch to play a sound
|
|
573
|
+
* @platform ios 15+
|
|
574
|
+
*/
|
|
575
|
+
interruptionLevel?: 'passive' | 'active' | 'timeSensitive' | 'critical';
|
|
556
576
|
};
|
|
557
577
|
|
|
558
578
|
/**
|
|
@@ -86,7 +86,22 @@ export function addNotificationResponseReceivedListener(
|
|
|
86
86
|
): Subscription {
|
|
87
87
|
return emitter.addListener<NotificationResponse>(
|
|
88
88
|
didReceiveNotificationResponseEventName,
|
|
89
|
-
|
|
89
|
+
(response: NotificationResponse) => {
|
|
90
|
+
const mappedResponse: NotificationResponse & {
|
|
91
|
+
notification: { request: { content: { dataString?: string } } };
|
|
92
|
+
} = { ...response };
|
|
93
|
+
try {
|
|
94
|
+
const dataString = mappedResponse?.notification?.request?.content['dataString'];
|
|
95
|
+
if (typeof dataString === 'string') {
|
|
96
|
+
mappedResponse.notification.request.content.data = JSON.parse(dataString);
|
|
97
|
+
delete mappedResponse.notification.request.content.dataString;
|
|
98
|
+
}
|
|
99
|
+
} catch (e: any) {
|
|
100
|
+
console.log(`Error in response: ${e}`);
|
|
101
|
+
}
|
|
102
|
+
console.log(`response received: ${JSON.stringify(mappedResponse, null, 2)}`);
|
|
103
|
+
listener(mappedResponse);
|
|
104
|
+
}
|
|
90
105
|
);
|
|
91
106
|
}
|
|
92
107
|
|