@ammarahmed/notifee-react-native 7.3.0

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.
Files changed (215) hide show
  1. package/.gitattributes +3 -0
  2. package/LICENSE +44 -0
  3. package/README.md +131 -0
  4. package/RNNotifee.podspec +39 -0
  5. package/RNNotifeeCore.podspec +33 -0
  6. package/android/build.gradle +116 -0
  7. package/android/gradle.properties +1 -0
  8. package/android/libs/app/notifee/core/202108261756/core-202108261756.aar +0 -0
  9. package/android/libs/app/notifee/core/202108261756/core-202108261756.aar.md5 +1 -0
  10. package/android/libs/app/notifee/core/202108261756/core-202108261756.aar.sha1 +1 -0
  11. package/android/libs/app/notifee/core/202108261756/core-202108261756.aar.sha256 +1 -0
  12. package/android/libs/app/notifee/core/202108261756/core-202108261756.aar.sha512 +1 -0
  13. package/android/libs/app/notifee/core/202108261756/core-202108261756.pom +9 -0
  14. package/android/libs/app/notifee/core/202108261756/core-202108261756.pom.md5 +1 -0
  15. package/android/libs/app/notifee/core/202108261756/core-202108261756.pom.sha1 +1 -0
  16. package/android/libs/app/notifee/core/202108261756/core-202108261756.pom.sha256 +1 -0
  17. package/android/libs/app/notifee/core/202108261756/core-202108261756.pom.sha512 +1 -0
  18. package/android/libs/app/notifee/core/maven-metadata.xml +13 -0
  19. package/android/libs/app/notifee/core/maven-metadata.xml.md5 +1 -0
  20. package/android/libs/app/notifee/core/maven-metadata.xml.sha1 +1 -0
  21. package/android/libs/app/notifee/core/maven-metadata.xml.sha256 +1 -0
  22. package/android/libs/app/notifee/core/maven-metadata.xml.sha512 +1 -0
  23. package/android/lint.xml +5 -0
  24. package/android/proguard-rules.pro +74 -0
  25. package/android/settings.gradle +1 -0
  26. package/android/src/main/AndroidManifest.xml +12 -0
  27. package/android/src/main/java/io/invertase/notifee/NotifeeApiModule.java +349 -0
  28. package/android/src/main/java/io/invertase/notifee/NotifeeEventSubscriber.java +118 -0
  29. package/android/src/main/java/io/invertase/notifee/NotifeeInitProvider.java +55 -0
  30. package/android/src/main/java/io/invertase/notifee/NotifeePackage.java +30 -0
  31. package/android/src/main/java/io/invertase/notifee/NotifeeReactUtils.java +244 -0
  32. package/app.plugin.js +1 -0
  33. package/dist/NotifeeApiModule.d.ts +53 -0
  34. package/dist/NotifeeApiModule.js +607 -0
  35. package/dist/NotifeeApiModule.js.map +1 -0
  36. package/dist/NotifeeJSEventEmitter.d.ts +3 -0
  37. package/dist/NotifeeJSEventEmitter.js +14 -0
  38. package/dist/NotifeeJSEventEmitter.js.map +1 -0
  39. package/dist/NotifeeNativeError.d.ts +15 -0
  40. package/dist/NotifeeNativeError.js +61 -0
  41. package/dist/NotifeeNativeError.js.map +1 -0
  42. package/dist/NotifeeNativeModule.d.ts +14 -0
  43. package/dist/NotifeeNativeModule.js +43 -0
  44. package/dist/NotifeeNativeModule.js.map +1 -0
  45. package/dist/NotifeeNativeModule.web.d.ts +12 -0
  46. package/dist/NotifeeNativeModule.web.js +19 -0
  47. package/dist/NotifeeNativeModule.web.js.map +1 -0
  48. package/dist/index.d.ts +8 -0
  49. package/dist/index.js +43 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/types/Library.d.ts +21 -0
  52. package/dist/types/Library.js +6 -0
  53. package/dist/types/Library.js.map +1 -0
  54. package/dist/types/Module.d.ts +572 -0
  55. package/dist/types/Module.js +6 -0
  56. package/dist/types/Module.js.map +1 -0
  57. package/dist/types/Notification.d.ts +450 -0
  58. package/dist/types/Notification.js +105 -0
  59. package/dist/types/Notification.js.map +1 -0
  60. package/dist/types/NotificationAndroid.d.ts +1276 -0
  61. package/dist/types/NotificationAndroid.js +380 -0
  62. package/dist/types/NotificationAndroid.js.map +1 -0
  63. package/dist/types/NotificationIOS.d.ts +537 -0
  64. package/dist/types/NotificationIOS.js +92 -0
  65. package/dist/types/NotificationIOS.js.map +1 -0
  66. package/dist/types/NotificationWeb.d.ts +5 -0
  67. package/dist/types/NotificationWeb.js +3 -0
  68. package/dist/types/NotificationWeb.js.map +1 -0
  69. package/dist/types/PowerManagerInfo.d.ts +36 -0
  70. package/dist/types/PowerManagerInfo.js +6 -0
  71. package/dist/types/PowerManagerInfo.js.map +1 -0
  72. package/dist/types/Trigger.d.ts +108 -0
  73. package/dist/types/Trigger.js +39 -0
  74. package/dist/types/Trigger.js.map +1 -0
  75. package/dist/utils/id.d.ts +1 -0
  76. package/dist/utils/id.js +16 -0
  77. package/dist/utils/id.js.map +1 -0
  78. package/dist/utils/index.d.ts +16 -0
  79. package/dist/utils/index.js +52 -0
  80. package/dist/utils/index.js.map +1 -0
  81. package/dist/utils/validate.d.ts +15 -0
  82. package/dist/utils/validate.js +93 -0
  83. package/dist/utils/validate.js.map +1 -0
  84. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfo.d.ts +2 -0
  85. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfo.js +39 -0
  86. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfo.js.map +1 -0
  87. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.d.ts +2 -0
  88. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.js +27 -0
  89. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.js.map +1 -0
  90. package/dist/validators/validate.d.ts +25 -0
  91. package/dist/validators/validate.js +75 -0
  92. package/dist/validators/validate.js.map +1 -0
  93. package/dist/validators/validateAndroidAction.d.ts +2 -0
  94. package/dist/validators/validateAndroidAction.js +52 -0
  95. package/dist/validators/validateAndroidAction.js.map +1 -0
  96. package/dist/validators/validateAndroidChannel.d.ts +2 -0
  97. package/dist/validators/validateAndroidChannel.js +155 -0
  98. package/dist/validators/validateAndroidChannel.js.map +1 -0
  99. package/dist/validators/validateAndroidChannelGroup.d.ts +2 -0
  100. package/dist/validators/validateAndroidChannelGroup.js +42 -0
  101. package/dist/validators/validateAndroidChannelGroup.js.map +1 -0
  102. package/dist/validators/validateAndroidFullScreenAction.d.ts +2 -0
  103. package/dist/validators/validateAndroidFullScreenAction.js +50 -0
  104. package/dist/validators/validateAndroidFullScreenAction.js.map +1 -0
  105. package/dist/validators/validateAndroidInput.d.ts +2 -0
  106. package/dist/validators/validateAndroidInput.js +54 -0
  107. package/dist/validators/validateAndroidInput.js.map +1 -0
  108. package/dist/validators/validateAndroidNotification.d.ts +2 -0
  109. package/dist/validators/validateAndroidNotification.js +529 -0
  110. package/dist/validators/validateAndroidNotification.js.map +1 -0
  111. package/dist/validators/validateAndroidPressAction.d.ts +2 -0
  112. package/dist/validators/validateAndroidPressAction.js +50 -0
  113. package/dist/validators/validateAndroidPressAction.js.map +1 -0
  114. package/dist/validators/validateAndroidStyle.d.ts +22 -0
  115. package/dist/validators/validateAndroidStyle.js +231 -0
  116. package/dist/validators/validateAndroidStyle.js.map +1 -0
  117. package/dist/validators/validateIOSAttachment.d.ts +6 -0
  118. package/dist/validators/validateIOSAttachment.js +102 -0
  119. package/dist/validators/validateIOSAttachment.js.map +1 -0
  120. package/dist/validators/validateIOSCategory.d.ts +2 -0
  121. package/dist/validators/validateIOSCategory.js +124 -0
  122. package/dist/validators/validateIOSCategory.js.map +1 -0
  123. package/dist/validators/validateIOSCategoryAction.d.ts +2 -0
  124. package/dist/validators/validateIOSCategoryAction.js +59 -0
  125. package/dist/validators/validateIOSCategoryAction.js.map +1 -0
  126. package/dist/validators/validateIOSInput.d.ts +2 -0
  127. package/dist/validators/validateIOSInput.js +32 -0
  128. package/dist/validators/validateIOSInput.js.map +1 -0
  129. package/dist/validators/validateIOSNotification.d.ts +2 -0
  130. package/dist/validators/validateIOSNotification.js +211 -0
  131. package/dist/validators/validateIOSNotification.js.map +1 -0
  132. package/dist/validators/validateIOSPermissions.d.ts +2 -0
  133. package/dist/validators/validateIOSPermissions.js +62 -0
  134. package/dist/validators/validateIOSPermissions.js.map +1 -0
  135. package/dist/validators/validateNotification.d.ts +11 -0
  136. package/dist/validators/validateNotification.js +129 -0
  137. package/dist/validators/validateNotification.js.map +1 -0
  138. package/dist/validators/validateTrigger.d.ts +2 -0
  139. package/dist/validators/validateTrigger.js +104 -0
  140. package/dist/validators/validateTrigger.js.map +1 -0
  141. package/dist/version.d.ts +1 -0
  142. package/dist/version.js.map +1 -0
  143. package/ios/NotifeeCore/Info.plist +22 -0
  144. package/ios/NotifeeCore/NotifeeCore+NSNotificationCenter.h +28 -0
  145. package/ios/NotifeeCore/NotifeeCore+NSNotificationCenter.m +72 -0
  146. package/ios/NotifeeCore/NotifeeCore+NSURLSession.h +25 -0
  147. package/ios/NotifeeCore/NotifeeCore+NSURLSession.m +55 -0
  148. package/ios/NotifeeCore/NotifeeCore+UNUserNotificationCenter.h +37 -0
  149. package/ios/NotifeeCore/NotifeeCore+UNUserNotificationCenter.m +242 -0
  150. package/ios/NotifeeCore/NotifeeCore.h +118 -0
  151. package/ios/NotifeeCore/NotifeeCore.m +784 -0
  152. package/ios/NotifeeCore/NotifeeCoreDelegateHolder.h +34 -0
  153. package/ios/NotifeeCore/NotifeeCoreDelegateHolder.m +70 -0
  154. package/ios/NotifeeCore/NotifeeCoreDownloadDelegate.h +39 -0
  155. package/ios/NotifeeCore/NotifeeCoreDownloadDelegate.m +68 -0
  156. package/ios/NotifeeCore/NotifeeCoreExtensionHelper.h +38 -0
  157. package/ios/NotifeeCore/NotifeeCoreExtensionHelper.m +224 -0
  158. package/ios/NotifeeCore/NotifeeCoreUtil.h +82 -0
  159. package/ios/NotifeeCore/NotifeeCoreUtil.m +793 -0
  160. package/ios/RNNotifee/NotifeeApiModule.h +25 -0
  161. package/ios/RNNotifee/NotifeeApiModule.m +371 -0
  162. package/ios/RNNotifee/NotifeeExtensionHelper.h +37 -0
  163. package/ios/RNNotifee/NotifeeExtensionHelper.m +37 -0
  164. package/ios/RNNotifee.xcodeproj/project.pbxproj +318 -0
  165. package/jest-mock.js +158 -0
  166. package/package.json +59 -0
  167. package/plugin/build/index.d.ts +3 -0
  168. package/plugin/build/index.js +12 -0
  169. package/plugin/build/index.js.map +1 -0
  170. package/plugin/build/withNotifeeProjectGradlePlugin.d.ts +5 -0
  171. package/plugin/build/withNotifeeProjectGradlePlugin.js +24 -0
  172. package/plugin/build/withNotifeeProjectGradlePlugin.js.map +1 -0
  173. package/plugin/src/index.ts +9 -0
  174. package/plugin/src/withNotifeeProjectGradlePlugin.ts +27 -0
  175. package/plugin/tsconfig.json +9 -0
  176. package/react-native.config.js +11 -0
  177. package/refresh-example.sh +71 -0
  178. package/src/NotifeeApiModule.ts +825 -0
  179. package/src/NotifeeJSEventEmitter.ts +11 -0
  180. package/src/NotifeeNativeError.ts +70 -0
  181. package/src/NotifeeNativeModule.ts +55 -0
  182. package/src/NotifeeNativeModule.web.ts +25 -0
  183. package/src/index.ts +33 -0
  184. package/src/types/Library.ts +28 -0
  185. package/src/types/Module.ts +625 -0
  186. package/src/types/Notification.ts +505 -0
  187. package/src/types/NotificationAndroid.ts +1443 -0
  188. package/src/types/NotificationIOS.ts +681 -0
  189. package/src/types/NotificationWeb.ts +5 -0
  190. package/src/types/PowerManagerInfo.ts +43 -0
  191. package/src/types/Trigger.ts +118 -0
  192. package/src/utils/id.ts +13 -0
  193. package/src/utils/index.ts +47 -0
  194. package/src/utils/validate.ts +92 -0
  195. package/src/validators/iosCommunicationInfo/validateIOSCommunicationInfo.ts +45 -0
  196. package/src/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.ts +33 -0
  197. package/src/validators/validate.ts +85 -0
  198. package/src/validators/validateAndroidAction.ts +54 -0
  199. package/src/validators/validateAndroidChannel.ts +188 -0
  200. package/src/validators/validateAndroidChannelGroup.ts +49 -0
  201. package/src/validators/validateAndroidFullScreenAction.ts +65 -0
  202. package/src/validators/validateAndroidInput.ts +67 -0
  203. package/src/validators/validateAndroidNotification.ts +704 -0
  204. package/src/validators/validateAndroidPressAction.ts +65 -0
  205. package/src/validators/validateAndroidStyle.ts +315 -0
  206. package/src/validators/validateIOSAttachment.ts +136 -0
  207. package/src/validators/validateIOSCategory.ts +150 -0
  208. package/src/validators/validateIOSCategoryAction.ts +65 -0
  209. package/src/validators/validateIOSInput.ts +38 -0
  210. package/src/validators/validateIOSNotification.ts +296 -0
  211. package/src/validators/validateIOSPermissions.ts +78 -0
  212. package/src/validators/validateNotification.ts +156 -0
  213. package/src/validators/validateTrigger.ts +134 -0
  214. package/src/version.ts +2 -0
  215. package/tsconfig.json +23 -0
@@ -0,0 +1,1443 @@
1
+ /*
2
+ * Copyright (c) 2016-present Invertase Limited
3
+ */
4
+
5
+ import { NotificationPressAction, NotificationFullScreenAction } from './Notification';
6
+
7
+ /**
8
+ * The interface for Android specific options which are applied to a notification.
9
+ *
10
+ * To learn more about Android notifications, view the [Android](/react-native/docs/android/introduction)
11
+ * documentation for full examples and usage.
12
+ *
13
+ * @platform android
14
+ */
15
+ export interface NotificationAndroid {
16
+ /**
17
+ * An array of [AndroidAction](/react-native/reference/androidaction) interfaces.
18
+ *
19
+ * Adds quick actions to a notification. Quick Actions enable users to interact with your application
20
+ * directly from the notification body, providing an overall greater user experience.
21
+ *
22
+ * View the [Quick Actions](/react-native/docs/android/interaction#quick-actions) documentation for more information.
23
+ */
24
+ actions?: AndroidAction[];
25
+
26
+ /**
27
+ * When set to `true` this notification will be shown as a foreground service.
28
+ *
29
+ * The application can only display one foreground service notification at once. If a
30
+ * foreground service notification is already running and a new notification with this flag set to
31
+ * `true` is provided, the service will stop the existing service and start a new one.
32
+ *
33
+ * Ensure a foreground service runner function has been provided to `registerForegroundService`.
34
+ * Without one, the notification will not be displayed.
35
+ *
36
+ * View the [Foreground Service](/react-native/docs/android/foreground-service) documentation for more information.
37
+ *
38
+ * Defaults to `false`.
39
+ */
40
+ asForegroundService?: boolean;
41
+
42
+ /**
43
+ * When set to `true` the screen will light up when the notification is displayed.
44
+ *
45
+ * Defaults to `false`.
46
+ */
47
+ lightUpScreen?: boolean;
48
+
49
+ /**
50
+ * Setting this flag will make it so the notification is automatically canceled when the user
51
+ * presses it in the panel.
52
+ *
53
+ * By default when the user taps a notification it is automatically removed from the notification
54
+ * panel. Setting this to `false` will keep the notification in the panel.
55
+ *
56
+ * If `false`, the notification will persist in the notification panel after being pressed. It will
57
+ * remain there until the user removes it (e.g. swipes away) or is cancelled via
58
+ * [`cancelNotification`](/react-native/reference/cancelNotification).
59
+ *
60
+ * Defaults to `true`.
61
+ */
62
+ autoCancel?: boolean;
63
+
64
+ /**
65
+ * Overrides the current number of active notifications shown on the device.
66
+ *
67
+ * If no number is provided, the system displays the current number of active notifications.
68
+ */
69
+ badgeCount?: number;
70
+
71
+ /**
72
+ * Sets the type of badge used when the notification is being displayed in badge mode.
73
+ *
74
+ * View the [Badges](/react-native/docs/android/appearance#badges) documentation for more information
75
+ * and usage examples.
76
+ *
77
+ * Defaults to `AndroidBadgeIconType.LARGE`.
78
+ *
79
+ * @platform android API Level >= 26
80
+ */
81
+ badgeIconType?: AndroidBadgeIconType;
82
+
83
+ /**
84
+ * Assigns the notification to a category. Use the one which best describes the notification.
85
+ *
86
+ * The category may be used by the device for ranking and filtering. It has no visual or behavioural
87
+ * impact.
88
+ */
89
+ category?: AndroidCategory;
90
+
91
+ /**
92
+ * Specifies the `AndroidChannel` which the notification will be delivered on.
93
+ *
94
+ * On Android 8.0 (API 26) the channel ID is required. Providing a invalid channel ID will throw
95
+ * an error. View the [Channels & Groups](/react-native/docs/android/channels) documentation for
96
+ * more information and usage examples.
97
+ */
98
+ channelId?: string;
99
+
100
+ /**
101
+ * Set an custom accent color for the notification. If not provided, the default notification
102
+ * system color will be used.
103
+ *
104
+ * The color can be a predefined system `AndroidColor` or [hexadecimal](https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4).
105
+ *
106
+ * View the [Color](/react-native/docs/android/appearance#color) documentation for more information.
107
+ */
108
+ color?: AndroidColor | string;
109
+
110
+ /**
111
+ * When `asForegroundService` is `true`, the notification will use the provided `color` property
112
+ * to set a background color on the notification. This property has no effect when `asForegroundService`
113
+ * is `false`.
114
+ *
115
+ * This should only be used for high priority ongoing tasks like navigation, an ongoing call,
116
+ * or other similarly high-priority events for the user.
117
+ *
118
+ * View the [Foreground Service](/react-native/docs/android/foreground-service) documentation for more information.
119
+ *
120
+ * Defaults to `false`.
121
+ */
122
+ colorized?: boolean;
123
+
124
+ /**
125
+ * If `showChronometer` is `true`, the direction of the chronometer can be changed to count down instead of up.
126
+ *
127
+ * Has no effect if `showChronometer` is `false`.
128
+ *
129
+ * Defaults to `up`.
130
+ */
131
+ chronometerDirection?: 'up' | 'down';
132
+
133
+ /**
134
+ * For devices without notification channel support, this property sets the default behaviour
135
+ * for a notification.
136
+ *
137
+ * On API Level >= 26, this has no effect.
138
+ *
139
+ * See [AndroidDefaults](/react-native/reference/androiddefaults) for more information.
140
+ *
141
+ * @platform android API Level < 26
142
+ */
143
+ defaults?: AndroidDefaults[];
144
+
145
+ /**
146
+ * Set this notification to be part of a group of notifications sharing the same key. Grouped notifications may
147
+ * display in a cluster or stack on devices which support such rendering.
148
+ *
149
+ * On some devices, the system may automatically group notifications.
150
+ *
151
+ * View the [Android Grouping & Sorting guide](/react-native/docs/android/grouping-and-sorting) documentation to
152
+ * learn more.
153
+ */
154
+ groupId?: string;
155
+
156
+ /**
157
+ * Sets the group alert behavior for this notification. Use this method to mute this notification
158
+ * if alerts for this notification's group should be handled by a different notification. This is
159
+ * only applicable for notifications that belong to a `groupId`. This must be called on all notifications
160
+ * you want to mute. For example, if you want only the summary of your group to make noise, all
161
+ * children in the group should have the group alert behavior `AndroidGroupAlertBehavior.SUMMARY`.
162
+ *
163
+ * View the [Android Grouping & Sorting guide](/react-native/docs/android/grouping-and-sorting#group-behaviour)
164
+ * documentation to learn more.
165
+ */
166
+ groupAlertBehavior?: AndroidGroupAlertBehavior;
167
+
168
+ /**
169
+ * Whether this notification should be a group summary.
170
+ *
171
+ * If `true`, Set this notification to be the group summary for a group of notifications. Grouped notifications may display in
172
+ * a cluster or stack on devices which support such rendering. Requires a `groupId` key to be set.
173
+ *
174
+ * Defaults to `false`.
175
+ */
176
+ groupSummary?: boolean;
177
+
178
+ /**
179
+ * The local user input history for this notification.
180
+ *
181
+ * Input history is shown on supported devices below the main notification body. History of the
182
+ * users input with the notification should be shown when receiving action input by updating
183
+ * the existing notification. It is recommended to clear the history when it is no longer
184
+ * relevant (e.g. someone has responded to the users input).
185
+ */
186
+ inputHistory?: string[];
187
+
188
+ /**
189
+ * A local file path using the 'require()' method or a remote http to the picture to display.
190
+ *
191
+ * Sets a large icon on the notification.
192
+ *
193
+ * View the [Android Appearance](/react-native/docs/android/appearance#large-icons) documentation to learn
194
+ * more about this property.
195
+ */
196
+ /* eslint-disable-next-line @typescript-eslint/ban-types */
197
+ largeIcon?: string | number | object;
198
+
199
+ /**
200
+ * Whether the large icon should be circular.
201
+ *
202
+ * If `true`, the large icon will be rounded in the shape of a circle.
203
+ *
204
+ * Defaults to `false`.
205
+ */
206
+ circularLargeIcon?: boolean;
207
+
208
+ /**
209
+ * Sets the color and frequency of the light pattern. This only has effect on supported devices.
210
+ *
211
+ * The option takes an array containing a hexadecimal color value or predefined `AndroidColor`,
212
+ * along with the number of milliseconds to show the light, and the number of milliseconds to
213
+ * turn off the light. The light frequency pattern is repeated.
214
+ *
215
+ * View the [Lights](/react-native/docs/android/behaviour#lights) documentation for more information.
216
+ */
217
+ lights?: [AndroidColor | string, number, number];
218
+
219
+ /**
220
+ * Sets whether the notification will only appear on the local device.
221
+ *
222
+ * Users who have connected devices which support notifications (such as a smart watch) will
223
+ * receive an alert for the notification on that device. If set to `true`, the notification will
224
+ * only alert on the main device.
225
+ *
226
+ * Defaults to `false`.
227
+ */
228
+ localOnly?: boolean;
229
+
230
+ /**
231
+ * Set whether this is an on-going notification.
232
+ *
233
+ * Setting this value to `true` changes the default behaviour of a notification:
234
+ *
235
+ * - Ongoing notifications are sorted above the regular notifications in the notification panel.
236
+ * - Ongoing notifications do not have an 'X' close button, and are not affected by the "Clear all" button.
237
+ *
238
+ * View the [Ongoing](/react-native/docs/android/behaviour#ongoing) documentation for more information.
239
+ */
240
+ ongoing?: boolean;
241
+
242
+ /**
243
+ * Set whether the sound should loop, by default, the sound will only play once.
244
+ *
245
+ * This property is useful if you have an ongoing notification.
246
+ */
247
+ loopSound?: boolean;
248
+
249
+ /**
250
+ * Set any additional flags
251
+ */
252
+ flags?: AndroidFlags[];
253
+
254
+ /**
255
+ * Notifications with the same `id` will only show a single instance at any one time on your device,
256
+ * however will still alert the user (for example, by making a sound).
257
+ *
258
+ * If this flag is set to `true`, notifications with the same `id` will only alert the user once whilst
259
+ * the notification is visible.
260
+ *
261
+ * This property is commonly used when frequently updating a notification (such as updating the progress bar).
262
+ */
263
+ onlyAlertOnce?: boolean;
264
+
265
+ /**
266
+ * By default notifications have no behaviour when a user presses them. The
267
+ * `pressAction` property allows you to set what happens when a user presses
268
+ * the notification.
269
+ *
270
+ * View the [Interaction](/react-native/docs/android/interaction) documentation to learn
271
+ * more.
272
+ */
273
+ pressAction?: NotificationPressAction;
274
+
275
+ /**
276
+ * The `fullScreenAction` property allows you to show a custom UI
277
+ * in full screen when the notification is displayed.
278
+ *
279
+ * View the [FullScreenAction](/react-native/docs/android/behaviour#full-screen-action) documentation to learn
280
+ * more.
281
+ */
282
+ fullScreenAction?: NotificationFullScreenAction;
283
+
284
+ /**
285
+ * Set a notification importance for devices without channel support.
286
+ *
287
+ * Devices using Android API Level < 26 have no channel support, meaning incoming notifications
288
+ * won't be assigned an importance level from the channel. If your application supports devices
289
+ * without channel support, set this property to directly assign an importance level to the incoming
290
+ * notification.
291
+ *
292
+ * Defaults to `AndroidImportance.DEFAULT`.
293
+ *
294
+ * View the [Appearance](/react-native/docs/android/appearance#importance) documentation to learn
295
+ * more.
296
+ *
297
+ * @platform android API Level < 26
298
+ */
299
+ importance?: AndroidImportance;
300
+
301
+ /**
302
+ * A notification can show current progress of a task. The progress state can either be fixed or
303
+ * indeterminate (unknown).
304
+ *
305
+ * View the [Progress Indicators](/react-native/docs/android/progress-indicators) documentation
306
+ * to learn more.
307
+ */
308
+ progress?: AndroidProgress;
309
+
310
+ /**
311
+ * Sets whether the `timestamp` provided is shown in the notification.
312
+ *
313
+ * Setting this field is useful for notifications which are more informative with a timestamp,
314
+ * such as an E-Mail.
315
+ *
316
+ * If no `timestamp` is set, this field has no effect.
317
+ *
318
+ * View the [Timestamps](/react-native/docs/android/timers#timestamps) documentation to learn more.
319
+ */
320
+ showTimestamp?: boolean;
321
+
322
+ /**
323
+ * The small icon to show in the heads-up notification.
324
+ *
325
+ * View the [Icons](/react-native/docs/android/appearance#small-icons) documentation to learn
326
+ * more.
327
+ */
328
+ smallIcon?: string;
329
+
330
+ /**
331
+ * An additional level parameter for when the icon is an instance of a Android `LevelListDrawable`.
332
+ */
333
+ smallIconLevel?: number;
334
+
335
+ /**
336
+ * Set a sort key that orders this notification among other notifications from the same package.
337
+ * This can be useful if an external sort was already applied and an app would like to preserve
338
+ * this. Notifications will be sorted lexicographically using this value, although providing
339
+ * different priorities in addition to providing sort key may cause this value to be ignored.
340
+ *
341
+ * If a `groupId` has been set, the sort key can also be used to order members of a notification group.
342
+ *
343
+ * View the [Android Grouping & Sorting](/react-native/docs/android/grouping-and-sorting#sorting)
344
+ * documentation to learn more.
345
+ */
346
+ sortKey?: string;
347
+
348
+ /**
349
+ * Styled notifications provide users with more informative content and additional functionality.
350
+ *
351
+ * Android supports different styles, however only one can be used with a notification.
352
+ *
353
+ * View the [Styles](/react-native/docs/android/styles) documentation to learn more
354
+ * view usage examples.
355
+ **/
356
+ style?: AndroidBigPictureStyle | AndroidBigTextStyle | AndroidInboxStyle | AndroidMessagingStyle;
357
+
358
+ /**
359
+ * Text that summarizes this notification for accessibility services. As of the Android L release, this
360
+ * text is no longer shown on screen, but it is still useful to accessibility services
361
+ * (where it serves as an audible announcement of the notification's appearance).
362
+ *
363
+ * Ticker text does not show in the notification.
364
+ */
365
+ ticker?: string;
366
+
367
+ /**
368
+ * Sets the time in milliseconds at which the notification should be
369
+ * automatically cancelled once displayed, if it is not already cancelled.
370
+ */
371
+ timeoutAfter?: number;
372
+
373
+ /**
374
+ * Shows a counting timer on the notification, useful for on-going notifications such as a phone call.
375
+ *
376
+ * If no `timestamp` is provided, a counter will display on the notification starting from 00:00. If a `timestamp` is
377
+ * provided, the number of hours/minutes/seconds since that have elapsed since that value will be shown instead.
378
+ *
379
+ * Defaults to `false`.
380
+ *
381
+ * View the [Timers](/react-native/docs/android/timers#timers) documentation to learn more.
382
+ */
383
+ showChronometer?: boolean;
384
+
385
+ /**
386
+ * Sets the vibration pattern the notification uses when displayed. Must be an even amount of numbers.
387
+ *
388
+ * View the [Vibration](/react-native/docs/android/behaviour#vibration) documentation to learn more.
389
+ */
390
+ vibrationPattern?: number[];
391
+
392
+ /**
393
+ * Sets the visibility for this notification. This may be used for apps which show user
394
+ * sensitive information (e.g. a banking app).
395
+ *
396
+ * Defaults to `AndroidVisibility.PRIVATE`.
397
+ *
398
+ * View the [Visibility](/react-native/docs/android/appearance#visibility) documentation to learn
399
+ * more.
400
+ */
401
+ visibility?: AndroidVisibility;
402
+
403
+ /**
404
+ * Sets a tag on the notification.
405
+ *
406
+ * Tags can be used to query groups notifications by the tag value. Setting a tag has no
407
+ * impact on the notification itself.
408
+ */
409
+ tag?: string;
410
+
411
+ /**
412
+ * The timestamp in milliseconds for this notification. Notifications in the panel are sorted by this time.
413
+ *
414
+ * The timestamp can be used with other properties to change the behaviour of a notification:
415
+ *
416
+ * - Use with `showTimestamp` to show the timestamp to the users.
417
+ * - Use with `showChronometer` to create a on-going timer.
418
+ *
419
+ * View the [Timers](/react-native/docs/android/timers) documentation to learn more.
420
+ */
421
+ timestamp?: number;
422
+
423
+ /**
424
+ * Overrides the sound the notification is displayed with.
425
+ *
426
+ * The default value is to play no sound. To play the default system sound use 'default'.
427
+ *
428
+ * This setting has no behaviour on Android after API level version 26, instead you can set the
429
+ * sound on the notification channels.
430
+ *
431
+ * View the [Sound](/react-native/docs/android/behaviour#sound) documentation for more information.
432
+ *
433
+ * @platform android API Level < 26
434
+ */
435
+ sound?: string;
436
+ }
437
+
438
+ /**
439
+ * An interface representing the current android only notification-related settings for your app.
440
+ *
441
+ * This interface is returned from [`requestPermission`](/react-native/reference/requestpermission)
442
+ * and [`getNotificationSettings`](/react-native/reference/getnotificationsettings).
443
+ *
444
+ * View the [Permissions](/react-native/docs/android/permissions) documentation to learn more.
445
+ *
446
+ * @platform android
447
+ */
448
+
449
+ export enum AndroidNotificationSetting {
450
+ /**
451
+ * This setting is not supported on this device. Usually this means that the Android version required
452
+ * for this setting has not been met.
453
+ */
454
+ NOT_SUPPORTED = -1,
455
+
456
+ /**
457
+ * This setting is currently disabled by the user.
458
+ */
459
+ DISABLED = 0,
460
+
461
+ /**
462
+ * This setting is currently enabled.
463
+ */
464
+ ENABLED = 1,
465
+ }
466
+
467
+ export interface AndroidNotificationSettings {
468
+ /**
469
+ * Enum describing if you can create triggers
470
+ *
471
+ * For Android < 12 / API < 31, this will default to true
472
+ *
473
+ * View the [Trigger](/react-native/docs/android/triggers#android-12-limitations) documentation for more information.
474
+ */
475
+ alarm: AndroidNotificationSetting;
476
+ }
477
+
478
+ /**
479
+ * The interface used to describe a notification quick action for Android.
480
+ *
481
+ * Notification actions allow users to interact with notifications, allowing you to handle events
482
+ * within your application. When an action completes (e.g. pressing an action, or filling out an input
483
+ * box) an event is sent.
484
+ *
485
+ * View the [Quick Actions](/react-native/docs/android/interaction#quick-actions) documentation to learn more.
486
+ *
487
+ * @platform android
488
+ */
489
+ export interface AndroidAction {
490
+ /**
491
+ * The press action interface describing what happens when an action completes.
492
+ *
493
+ * Note; unlike the `pressAction` in the notification body, an action does not need to open the application
494
+ * and can perform background tasks. See the [AndroidPressAction](/react-native/reference/androidpressaction) reference
495
+ * or [Quick Actions](/react-native/docs/android/interaction#quick-actions) documentation to learn more.
496
+ */
497
+ pressAction: NotificationPressAction;
498
+
499
+ /**
500
+ * The title of the action, e.g. "Reply", "Mark as read" etc.
501
+ */
502
+ title: string;
503
+
504
+ /**
505
+ * An remote http or local icon path representing the action. Newer devices may not show the icon.
506
+ *
507
+ * Recommended icon size is 24x24 px.
508
+ */
509
+ icon?: string;
510
+
511
+ /**
512
+ * If provided, the action accepts user input.
513
+ *
514
+ * If `true`, the user will be able to provide free text input when the action is pressed. This
515
+ * property can be further configured for advanced inputs.
516
+ *
517
+ * View the [Action Input](/react-native/docs/android/interaction#action-input) documentation to
518
+ * learn more.
519
+ */
520
+ input?: true | AndroidInput;
521
+ }
522
+
523
+ /**
524
+ * The interface used to enable advanced user input on a notification.
525
+ *
526
+ * View the [Action Input](/react-native/docs/android/interaction#action-input) documentation to learn more.
527
+ *
528
+ * @platform android
529
+ */
530
+ export interface AndroidInput {
531
+ /**
532
+ * Sets whether the user can freely enter text into the input.
533
+ *
534
+ * This value changes the behaviour of the notification:
535
+ *
536
+ * - If `true`, when an action is pressed this allows the user to type free form text into the input area.
537
+ * - If `false`, you must provide an array of `choices` the user is allowed to use as the input.
538
+ *
539
+ * Defaults to `true`.
540
+ */
541
+ allowFreeFormInput?: boolean;
542
+
543
+ /**
544
+ * Sets whether generated replies can be added to the action.
545
+ *
546
+ * Generated replies will only be shown if the input has `choices` and whether the device
547
+ * is able to generate replies.
548
+ *
549
+ * Defaults to `true`.
550
+ */
551
+ allowGeneratedReplies?: boolean;
552
+
553
+ /**
554
+ * An array of pre-defined input choices the user can select.
555
+ *
556
+ * If `allowFreeFormInput` is `false`, this property must contain at least one choice.
557
+ */
558
+ choices?: string[];
559
+
560
+ /**
561
+ * If `true`, the user will be able to edit the selected choice before sending the action event, however
562
+ * `allowFreeFormInput` must also be `true`.
563
+ *
564
+ * By default, the platform will decide whether choices can be editable. To explicitly enable or disable
565
+ * this, provide `true` or `false`.
566
+ */
567
+ editableChoices?: boolean;
568
+
569
+ /**
570
+ * The placeholder text to display inside of the user input area.
571
+ */
572
+ placeholder?: string;
573
+ }
574
+
575
+ /**
576
+ * The interface used when displaying a Big Picture Style notification.
577
+ *
578
+ * <Vimeo id="android-style-bigpicture" caption="Android Big Picture Style" />
579
+ *
580
+ * View the [Big Picture](/react-native/docs/android/styles#big-picture) documentation to learn more.
581
+ *
582
+ * @platform android
583
+ */
584
+ export interface AndroidBigPictureStyle {
585
+ /**
586
+ * Constant enum value used to identify the style type.
587
+ */
588
+ type: AndroidStyle.BIGPICTURE;
589
+
590
+ /**
591
+ * A local file path using the 'require()' method or a HTTP or file URL to the picture to display.
592
+ *
593
+ * The image will be automatically resized depending on the device and it's size. If the image could
594
+ * not be found a blank space will appear.
595
+ */
596
+ /* eslint-disable-next-line @typescript-eslint/ban-types */
597
+ picture: string | number | object;
598
+
599
+ /**
600
+ * If set, overrides the main notification `title` when the notification is expanded.
601
+ */
602
+ title?: string;
603
+
604
+ /**
605
+ * A local file path using the 'require()' method or a HTTP or file URL to the picture to display.
606
+ *
607
+ * If set, overrides the main notification `largeIcon` when the notification is expanded.
608
+ *
609
+ * To hide the `largeIcon` when the notification is expanded, set to null. Similar to `thumbnailHidden` for attachments on iOS.
610
+ */
611
+ /* eslint-disable-next-line @typescript-eslint/ban-types */
612
+ largeIcon?: string | number | object | null;
613
+
614
+ /**
615
+ * If set, overrides the main notification `summary` when the notification is expanded.
616
+ */
617
+ summary?: string;
618
+ }
619
+
620
+ /**
621
+ * The interface used when displaying a Big Text Style notification.
622
+ *
623
+ * <Vimeo id="android-style-bigtext" caption="Android Big Text Style" />
624
+ *
625
+ * View the [Big Text](/react-native/docs/android/styles#big-text) documentation to learn more.
626
+ *
627
+ * @platform android
628
+ */
629
+ export interface AndroidBigTextStyle {
630
+ /**
631
+ * Constant enum value used to identify the style type.
632
+ */
633
+ type: AndroidStyle.BIGTEXT;
634
+
635
+ /**
636
+ * The text to display when the notification is expanded.
637
+ */
638
+ text: string;
639
+
640
+ /**
641
+ * If set, overrides the main notification `title` when the notification is expanded.
642
+ */
643
+ title?: string;
644
+
645
+ /**
646
+ * If set, overrides the main notification `summary` when the notification is expanded.
647
+ */
648
+ summary?: string;
649
+ }
650
+
651
+ /**
652
+ * The interface used when displaying a Inbox Style notification.
653
+ *
654
+ * <Vimeo id="android-style-inbox" caption="Android Inbox Style" />
655
+ *
656
+ * View the [Inbox](/react-native/docs/android/styles#inbox) documentation to learn more.
657
+ *
658
+ * @platform android
659
+ */
660
+ export interface AndroidInboxStyle {
661
+ /**
662
+ * Constant enum value used to identify the style type.
663
+ */
664
+ type: AndroidStyle.INBOX;
665
+
666
+ /**
667
+ * An array of messages to display, in order provided.
668
+ *
669
+ * The device will automatically handle displaying the lines visible depending on space in the notification
670
+ * shade.
671
+ */
672
+ lines: string[];
673
+
674
+ /**
675
+ * If set, overrides the main notification `title` when the notification is expanded.
676
+ */
677
+ title?: string;
678
+
679
+ /**
680
+ * If set, overrides the main notification `summary` when the notification is expanded.
681
+ */
682
+ summary?: string;
683
+ }
684
+
685
+ /**
686
+ * The interface used when displaying a Messaging Style notification.
687
+ *
688
+ * <Vimeo id="android-style-messaging" caption="Android Messaging Style" />
689
+ *
690
+ * View the [Messaging](/react-native/docs/android/styles#messaging) documentation to learn more.
691
+ *
692
+ * @platform android
693
+ */
694
+ export interface AndroidMessagingStyle {
695
+ /**
696
+ * Constant enum value used to identify the style type.
697
+ */
698
+ type: AndroidStyle.MESSAGING;
699
+
700
+ /**
701
+ * The person who is receiving a message on the current device.
702
+ */
703
+ person: AndroidPerson;
704
+
705
+ /**
706
+ * An array of messages to display inside the notification.
707
+ */
708
+ messages: AndroidMessagingStyleMessage[];
709
+
710
+ /**
711
+ * If set, overrides the main notification `title` when the notification is expanded.
712
+ */
713
+ title?: string;
714
+
715
+ /**
716
+ * Sets whether this conversation notification represents a group (3 or more persons).
717
+ */
718
+ group?: boolean;
719
+ }
720
+
721
+ /**
722
+ * The interface for messages when constructing a Messaging Style notification.
723
+ *
724
+ * <Vimeo id="android-style-messaging" caption="Android Messaging Style" />
725
+ *
726
+ * View the [`AndroidMessagingStyle`](/react-native/reference/androidmessagingstyle) reference
727
+ * and [Messaging](/react-native/docs/android/styles#messaging) documentation to learn more.
728
+ *
729
+ * @platform android
730
+ */
731
+ export interface AndroidMessagingStyleMessage {
732
+ /**
733
+ * The content of the message.
734
+ */
735
+ text: string;
736
+
737
+ /**
738
+ * The timestamp of when the message arrived in milliseconds.
739
+ */
740
+ timestamp: number;
741
+
742
+ /**
743
+ * The sender of this message. See [`AndroidPerson`](/react-native/reference/androidperson) reference
744
+ * for more information on the properties available.
745
+ *
746
+ * This property should only be provided if the message is from an external person, and not the person receiving the message.
747
+ */
748
+ person?: AndroidPerson;
749
+ }
750
+
751
+ /**
752
+ * The interface used to describe a person shown in notifications.
753
+ *
754
+ * Currently used with [`AndroidMessagingStyle`](/react-native/reference/androidmessagingstyle) notifications.
755
+ *
756
+ * @platform android
757
+ */
758
+ export interface AndroidPerson {
759
+ /**
760
+ * The name of the person.
761
+ *
762
+ * If no `id` is provided, the name will be used as the unique identifier.
763
+ */
764
+ name: string;
765
+
766
+ /**
767
+ * An optional unique ID of the person. Setting this property is preferred for unique identification,
768
+ * however not required. If no value is provided, the `name` will be used instead..
769
+ */
770
+ id?: string;
771
+
772
+ /**
773
+ * If `true` this person represents a machine rather than a human. This is used primarily for testing and automated tooling.
774
+ *
775
+ * Defaults to `false`.
776
+ */
777
+ bot?: boolean;
778
+
779
+ /**
780
+ * If `true` this person will be marked as important.
781
+ *
782
+ * Important users are those who frequently contact the receiving person. If the app is in
783
+ * "Do not disturb" mode, a notification containing an important person may override this mode
784
+ * if the person has been whitelisted on the device.
785
+ *
786
+ * Defaults to `false`.
787
+ */
788
+ important?: boolean;
789
+
790
+ /**
791
+ * The icon to display next to the person in the notification. The icon can be URL or local
792
+ * Android resource.
793
+ *
794
+ * If not provided, an icon will be automatically creating using the `name` property.
795
+ */
796
+ icon?: string;
797
+
798
+ /**
799
+ * URI contact of the person.
800
+ *
801
+ * The URI can be any of the following:
802
+ *
803
+ * - The representation of a contact URI, e.g. `android.provider.ContactsContract.Contacts#CONTENT_LOOKUP_URI`
804
+ * - A `mailto:` string
805
+ * - A `tel:` string
806
+ */
807
+ uri?: string;
808
+ }
809
+
810
+ /**
811
+ * Interface for defining the progress of an Android Notification.
812
+ *
813
+ * <Vimeo id="android-progress-summary" caption="Android Progress (w/ Big Picture Style)" />
814
+ *
815
+ * View the [Progress Indicators](/react-native/docs/android/progress-indicators) documentation to learn more.
816
+ *
817
+ * @platform android
818
+ */
819
+ export interface AndroidProgress {
820
+ /**
821
+ * The maximum progress number. E.g `10`.
822
+ *
823
+ * Must be greater than the `current` value.
824
+ */
825
+ max?: number;
826
+
827
+ /**
828
+ * The current progress value.
829
+ *
830
+ * E.g. setting to `4` with a `max` value of `10` would set a fixed progress bar on the notification at 40% complete.
831
+ */
832
+ current?: number;
833
+
834
+ /**
835
+ * If `true`, overrides the `max` and `current` values and displays an unknown progress style. Useful when you have no
836
+ * knowledge of a tasks completion state.
837
+ *
838
+ * Defaults to `false`.
839
+ */
840
+ indeterminate?: boolean;
841
+ }
842
+
843
+ /**
844
+ * An interface for describing an Android Channel.
845
+ *
846
+ * Channels override any individual notification preferences (e.g. lights/vibration) and the user
847
+ * has final control over the setting. Once created, only channel metadata can be updated (e.g. name).
848
+ *
849
+ * View the [Channels & Groups](/react-native/docs/android/channels) documentation to learn more.
850
+ *
851
+ * @platform android
852
+ */
853
+ export interface AndroidChannel {
854
+ /**
855
+ * The unique channel ID.
856
+ */
857
+ id: string;
858
+
859
+ /**
860
+ * The channel name. This is shown to the user so must be descriptive and relate to the notifications
861
+ * which will be delivered under this channel.
862
+ *
863
+ * This setting can be updated after creation.
864
+ */
865
+ name: string;
866
+
867
+ /**
868
+ * Sets whether badges are enabled for the channel.
869
+ *
870
+ * View the [Badges](/react-native/docs/android/appearance#badges) documentation to learn more.
871
+ *
872
+ * Defaults to `true`.
873
+ *
874
+ * This setting cannot be overridden once the channel is created.
875
+ */
876
+ badge?: boolean;
877
+
878
+ /**
879
+ * Sets whether or not notifications posted to this channel can interrupt the user in
880
+ * 'Do Not Disturb' mode.
881
+ *
882
+ * Defaults to `false`.
883
+ *
884
+ * This setting cannot be overridden once the channel is created.
885
+ *
886
+ * @platform android API Level >= 29
887
+ */
888
+ bypassDnd?: boolean;
889
+
890
+ /**
891
+ * Sets the user visible description of this channel.
892
+ *
893
+ * The recommended maximum length is 300 characters; the value may be truncated if it is too long.
894
+ *
895
+ * This setting can be updated after creation.
896
+ *
897
+ * @platform android API Level >= 28
898
+ */
899
+ description?: string;
900
+
901
+ /**
902
+ * Sets whether notifications posted to this channel should display notification lights, on devices that support that feature.
903
+ *
904
+ * Defaults to `true`.
905
+ *
906
+ * This setting cannot be overridden once the channel is created.
907
+ */
908
+ lights?: boolean;
909
+
910
+ /**
911
+ * Sets whether notification posted to this channel should vibrate.
912
+ *
913
+ * Defaults to `true`.
914
+ *
915
+ * This setting cannot be overridden once the channel is created.
916
+ */
917
+ vibration?: boolean;
918
+
919
+ /**
920
+ * Sets what group this channel belongs to. Group information is only used for presentation, not for behavior.
921
+ *
922
+ * Groups can be created via via [`createChannelGroup`](/react-native/reference/createchannelgroup).
923
+ *
924
+ * This setting cannot be overridden once the channel is created.
925
+ */
926
+ groupId?: string;
927
+
928
+ /**
929
+ * Sets the level of interruption of this notification channel.
930
+ *
931
+ * Defaults to `AndroidImportance.DEFAULT`.
932
+ *
933
+ * This setting can only be set to a lower importance level once set.
934
+ */
935
+ importance?: AndroidImportance;
936
+
937
+ /**
938
+ * If lights are enabled (via `lights`), sets/overrides the light color for notifications
939
+ * posted to this channel.
940
+ *
941
+ * This setting cannot be overridden once the channel is created.
942
+ */
943
+ lightColor?: AndroidColor | string;
944
+
945
+ /**
946
+ * Sets whether notifications posted to this channel appear on the lockscreen or not,
947
+ * and if so, whether they appear in a redacted form.
948
+ *
949
+ * Defaults to `AndroidVisibility.PRIVATE`.
950
+ *
951
+ * This setting cannot be overridden once the channel is created.
952
+ */
953
+ visibility?: AndroidVisibility;
954
+
955
+ /**
956
+ * Sets/overrides the vibration pattern for notifications posted to this channel.
957
+ *
958
+ * The pattern in milliseconds. Must be an even amount of numbers.
959
+ *
960
+ * This setting cannot be overridden once the channel is created.
961
+ */
962
+ vibrationPattern?: number[];
963
+
964
+ /**
965
+ * Overrides the sound the notification is displayed with.
966
+ *
967
+ * The default value is to play no sound. To play the default system sound use 'default'.
968
+ *
969
+ * This setting cannot be overridden once the channel is created.
970
+ */
971
+ sound?: string;
972
+
973
+ /**
974
+ * The URI of the notification sound associated with the channel, if any.
975
+ *
976
+ * This is a read-only value, and is under user control after the channel is created
977
+ */
978
+ soundURI?: string;
979
+ }
980
+
981
+ /**
982
+ * An interface which describes a channel which has been fetched from the device.
983
+ *
984
+ * Contains additional information which is only available when fetching the channel from the device.
985
+ *
986
+ * @platform android
987
+ */
988
+ export interface NativeAndroidChannel extends AndroidChannel {
989
+ /*
990
+ * Returns whether or not notifications posted to this Channel group are
991
+ * blocked.
992
+ *
993
+ * On API levels < 28, returns `false`.
994
+ *
995
+ * View the [Listening to channel events](/react-native/docs/android/channels#listening-to-channel-events)
996
+ * documentation to learn more about subscribing to when a channel is blocked by the user.
997
+ *
998
+ * @platform android API Level >= 28
999
+ */
1000
+ blocked: boolean;
1001
+ }
1002
+
1003
+ /**
1004
+ * An interface for describing an Android Channel Group.
1005
+ *
1006
+ * Channel groups have no impact on the notification, they are used to help group channels in the applications
1007
+ * settings UI.
1008
+ *
1009
+ * View the [Channels & Groups](/react-native/docs/android/channels) documentation to learn more.
1010
+ *
1011
+ * @platform android API Level >= 26
1012
+ */
1013
+ export interface AndroidChannelGroup {
1014
+ /**
1015
+ * Unique id for this channel group.
1016
+ */
1017
+ id: string;
1018
+
1019
+ /**
1020
+ * The name of the group. This is visible to the user so should be a descriptive name which
1021
+ * categorizes other channels (e.g. reminders).
1022
+ *
1023
+ * The recommended maximum length is 40 characters; the value may be truncated if it is too long.
1024
+ */
1025
+ name: string;
1026
+
1027
+ /**
1028
+ * An optional description of the group. This is visible to the user.
1029
+ *
1030
+ * On Android APIs less than 28 this will always be undefined.
1031
+ *
1032
+ * @platform android API Level >= 28
1033
+ */
1034
+ description?: string;
1035
+ }
1036
+
1037
+ /**
1038
+ * An interface which describes a channel group which has been fetched from the device.
1039
+ *
1040
+ * Contains additional information which is only available when fetching the channel group from the device.
1041
+ *
1042
+ * @platform android API Level >= 26
1043
+ */
1044
+ export interface NativeAndroidChannelGroup extends AndroidChannelGroup {
1045
+ /**
1046
+ * Returns whether or not notifications posted to a Channel belonging to this group are
1047
+ * blocked by the user.
1048
+ *
1049
+ * On API levels < 28, returns `false`.
1050
+ *
1051
+ * View the [Listening to channel events](/react-native/docs/android/channels#listening-to-channel-events)
1052
+ * documentation to learn more about subscribing to when a channel is blocked by the user.
1053
+ *
1054
+ * @platform android API Level >= 28
1055
+ */
1056
+ blocked: boolean;
1057
+
1058
+ /**
1059
+ * Returns a list of channels assigned to this channel group.
1060
+ */
1061
+ channels: NativeAndroidChannel[];
1062
+ }
1063
+
1064
+ /**
1065
+ * Enum used to define how a notification badge is displayed in badge mode.
1066
+ *
1067
+ * View the [Badges](/react-native/docs/android/appearance#badges) documentation for more information.
1068
+ *
1069
+ * @platform android
1070
+ */
1071
+ export enum AndroidBadgeIconType {
1072
+ /**
1073
+ * No badge is displayed, will always show as a number.
1074
+ */
1075
+ NONE = 0,
1076
+
1077
+ /**
1078
+ * Shows the badge as the notifications `smallIcon`.
1079
+ */
1080
+ SMALL = 1,
1081
+
1082
+ /**
1083
+ * Shows the badge as the notifications `largeIcon` (if available).
1084
+ *
1085
+ * This is the default value used by a notification if not provided.
1086
+ */
1087
+ LARGE = 2,
1088
+ }
1089
+
1090
+ /**
1091
+ * Enum used to describe the category of a notification.
1092
+ *
1093
+ * Setting a category on a notification helps the device to understand what the notification is for,
1094
+ * or what impact it will have on the user. The category can be used for ranking and filtering
1095
+ * the notification, however has no visual impact on the notification.
1096
+ *
1097
+ * @platform android
1098
+ */
1099
+ export enum AndroidCategory {
1100
+ ALARM = 'alarm',
1101
+ CALL = 'call',
1102
+ EMAIL = 'email',
1103
+ ERROR = 'error',
1104
+ EVENT = 'event',
1105
+ MESSAGE = 'msg',
1106
+ NAVIGATION = 'navigation',
1107
+ PROGRESS = 'progress',
1108
+ PROMO = 'promo',
1109
+ RECOMMENDATION = 'recommendation',
1110
+ REMINDER = 'reminder',
1111
+ SERVICE = 'service',
1112
+ SOCIAL = 'social',
1113
+ STATUS = 'status',
1114
+
1115
+ /**
1116
+ * Avoid using - generally used by the system.
1117
+ */
1118
+ SYSTEM = 'sys',
1119
+ TRANSPORT = 'transport',
1120
+ }
1121
+
1122
+ /**
1123
+ * A set or predefined colors which can be used with Android Notifications.
1124
+ *
1125
+ * View the [Color](/react-native/docs/android/appearance#color) documentation to learn more.
1126
+ *
1127
+ * @platform android
1128
+ */
1129
+ export enum AndroidColor {
1130
+ RED = 'red',
1131
+ BLUE = 'blue',
1132
+ GREEN = 'green',
1133
+ BLACK = 'black',
1134
+ WHITE = 'white',
1135
+ CYAN = 'cyan',
1136
+ MAGENTA = 'magenta',
1137
+ YELLOW = 'yellow',
1138
+ LIGHTGRAY = 'lightgray',
1139
+ DARKGRAY = 'darkgray',
1140
+ GRAY = 'gray',
1141
+ LIGHTGREY = 'lightgrey',
1142
+ DARKGREY = 'darkgrey',
1143
+ AQUA = 'aqua',
1144
+ FUCHSIA = 'fuchsia',
1145
+ LIME = 'lime',
1146
+ MAROON = 'maroon',
1147
+ NAVY = 'navy',
1148
+ OLIVE = 'olive',
1149
+ PURPLE = 'purple',
1150
+ SILVER = 'silver',
1151
+ TEAL = 'teal',
1152
+ }
1153
+
1154
+ /**
1155
+ * On devices which do not support notification channels (API Level < 26), the notification
1156
+ * by default will use all methods to alert the user (depending on the importance).
1157
+ *
1158
+ * To override the default behaviour, provide an array of defaults to the notification.
1159
+ *
1160
+ * On API Levels >= 26, this has no effect and notifications will use the channel behaviour.
1161
+ *
1162
+ * @platform android API Level < 26
1163
+ */
1164
+ export enum AndroidDefaults {
1165
+ /**
1166
+ * All options will be used, where possible.
1167
+ */
1168
+ ALL = -1,
1169
+
1170
+ /**
1171
+ * The notification will use lights to alert the user.
1172
+ */
1173
+ LIGHTS = 4,
1174
+
1175
+ /**
1176
+ * The notification will use sound to alert the user.
1177
+ */
1178
+ SOUND = 1,
1179
+
1180
+ /**
1181
+ * The notification will vibrate to alert the user.
1182
+ */
1183
+ VIBRATE = 2,
1184
+ }
1185
+
1186
+ /**
1187
+ * Enum used to set any additional flags supported on Android.
1188
+ * See Android's [setFlag()](https://developer.android.com/reference/android/app/Notification.Builder#setFlag(int,%20boolean)) documentation.
1189
+ */
1190
+ export enum AndroidFlags {
1191
+ /**
1192
+ * The audio will be repeated until the notification is cancelled or the notification window is opened.
1193
+ * This will be set for you by setting `loopSound`.
1194
+ */
1195
+ FLAG_INSISTENT = 4,
1196
+ }
1197
+
1198
+ /**
1199
+ * Enum used to describe how a notification alerts the user when it apart of a group.
1200
+ *
1201
+ * View the [Grouping & Sorting](/react-native/docs/android/grouping-and-sorting#group-behaviour) documentation to
1202
+ * learn more.
1203
+ *
1204
+ * @platform android
1205
+ */
1206
+ export enum AndroidGroupAlertBehavior {
1207
+ /**
1208
+ * All notifications will alert.
1209
+ */
1210
+ ALL = 0,
1211
+
1212
+ /**
1213
+ * Only the summary notification will alert the user when displayed. The children of the group will not alert.
1214
+ */
1215
+ SUMMARY = 1,
1216
+
1217
+ /**
1218
+ * Children of a group will alert the user. The summary notification will not alert when displayed.
1219
+ */
1220
+ CHILDREN = 2,
1221
+ }
1222
+
1223
+ /**
1224
+ * Available Android Notification Styles.
1225
+ *
1226
+ * View the [Styles](/react-native/docs/android/styles) documentation to learn more with example usage.
1227
+ *
1228
+ * @platform android
1229
+ */
1230
+ export enum AndroidStyle {
1231
+ BIGPICTURE = 0,
1232
+ BIGTEXT = 1,
1233
+ INBOX = 2,
1234
+ MESSAGING = 3,
1235
+ }
1236
+
1237
+ /**
1238
+ * Interface used to define the visibility of an Android notification.
1239
+ *
1240
+ * Use with the `visibility` property on the notification.
1241
+ *
1242
+ * View the [Visibility](/react-native/docs/android/appearance#visibility) documentation to learn more.
1243
+ *
1244
+ * Default value is `AndroidVisibility.PRIVATE`.
1245
+ *
1246
+ * @platform android
1247
+ */
1248
+ export enum AndroidVisibility {
1249
+ /**
1250
+ * Show the notification on all lockscreens, but conceal sensitive or private information on secure lockscreens.
1251
+ */
1252
+ PRIVATE = 0,
1253
+
1254
+ /**
1255
+ * Show this notification in its entirety on all lockscreens.
1256
+ */
1257
+ PUBLIC = 1,
1258
+
1259
+ /**
1260
+ * Do not reveal any part of this notification on a secure lockscreen.
1261
+ *
1262
+ * Useful for notifications showing sensitive information such as banking apps.
1263
+ */
1264
+ SECRET = -1,
1265
+ }
1266
+
1267
+ /**
1268
+ * The interface describing the importance levels of an incoming notification.
1269
+ *
1270
+ * The importance level can be set directly onto a notification channel for supported devices (API Level >= 26)
1271
+ * or directly onto the notification for devices which do not support channels.
1272
+ *
1273
+ * The importance is used to both change the visual prompt of a received notification
1274
+ * and also how it visually appears on the device.
1275
+ *
1276
+ * View the [Android Appearance](/react-native/docs/android/appearance#importance) documentation to learn more.
1277
+ *
1278
+ * @platform android
1279
+ */
1280
+ export enum AndroidImportance {
1281
+ /**
1282
+ * The default importance applied to a channel/notification.
1283
+ *
1284
+ * The application small icon will show in the device statusbar. When the user pulls down the
1285
+ * notification shade, the notification will show in it's expanded state (if applicable).
1286
+ */
1287
+ DEFAULT = 3,
1288
+
1289
+ /**
1290
+ * The highest importance level applied to a channel/notification.
1291
+ *
1292
+ * The notifications will appear on-top of applications, allowing direct interaction without pulling
1293
+ * down the notification shade. This level should only be used for urgent notifications, such as
1294
+ * incoming phone calls, messages etc, which require immediate attention.
1295
+ */
1296
+ HIGH = 4,
1297
+
1298
+ /**
1299
+ * A low importance level applied to a channel/notification.
1300
+ *
1301
+ * On Android, the application small icon will show in the device statusbar, however the notification will not alert
1302
+ * the user (no sound or vibration). The notification will show in it's expanded state when the
1303
+ * notification shade is pulled down.
1304
+ *
1305
+ * On iOS, the notification will not display to the user or alert them. It will still be visible on the devices
1306
+ * notification center.
1307
+ */
1308
+ LOW = 2,
1309
+
1310
+ /**
1311
+ * The minimum importance level applied to a channel/notification.
1312
+ *
1313
+ * The application small icon will not show up in the statusbar, or alert the user. The notification
1314
+ * will be in a collapsed state in the notification shade and placed at the bottom of the list.
1315
+ *
1316
+ * This level should be used when the notification requires no immediate attention. An example of this
1317
+ * importance level is the Google app providing weather updates and only being visible when the
1318
+ * user pulls the notification shade down,
1319
+ */
1320
+ MIN = 1,
1321
+
1322
+ /**
1323
+ * The notification will not be shown. This has the same effect as the user disabling notifications
1324
+ * in the application settings.
1325
+ */
1326
+ NONE = 0,
1327
+ }
1328
+
1329
+ /**
1330
+ * An enum representing the various flags that can be passed along to `launchActivityFlags` on `NotificationPressAction`.
1331
+ *
1332
+ * These flags are added to the Android [Intent](https://developer.android.com/reference/android/content/Intent.html) that launches your activity.
1333
+ *
1334
+ * These are only required if you need to customise the behaviour of your activities, in most cases you might not need these.
1335
+ *
1336
+ * @platform android
1337
+ */
1338
+ export enum AndroidLaunchActivityFlag {
1339
+ /**
1340
+ * See [FLAG_ACTIVITY_NO_HISTORY](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NO_HISTORY) on the official Android documentation for more information.
1341
+ */
1342
+ NO_HISTORY = 0,
1343
+
1344
+ /**
1345
+ * See [FLAG_ACTIVITY_SINGLE_TOP](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_SINGLE_TOP) on the official Android documentation for more information.
1346
+ */
1347
+ SINGLE_TOP = 1,
1348
+
1349
+ /**
1350
+ * See [FLAG_ACTIVITY_NEW_TASK](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NEW_TASK) on the official Android documentation for more information.
1351
+ */
1352
+ NEW_TASK = 2,
1353
+
1354
+ /**
1355
+ * See [FLAG_ACTIVITY_MULTIPLE_TASK](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_MULTIPLE_TASK) on the official Android documentation for more information.
1356
+ */
1357
+ MULTIPLE_TASK = 3,
1358
+
1359
+ /**
1360
+ * See [FLAG_ACTIVITY_CLEAR_TOP](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_TOP) on the official Android documentation for more information.
1361
+ */
1362
+ CLEAR_TOP = 4,
1363
+
1364
+ /**
1365
+ * See [FLAG_ACTIVITY_FORWARD_RESULT](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_FORWARD_RESULT) on the official Android documentation for more information.
1366
+ */
1367
+ FORWARD_RESULT = 5,
1368
+
1369
+ /**
1370
+ * See [FLAG_ACTIVITY_PREVIOUS_IS_TOP](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_PREVIOUS_IS_TOP) on the official Android documentation for more information.
1371
+ */
1372
+ PREVIOUS_IS_TOP = 6,
1373
+
1374
+ /**
1375
+ * See [FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS) on the official Android documentation for more information.
1376
+ */
1377
+ EXCLUDE_FROM_RECENTS = 7,
1378
+
1379
+ /**
1380
+ * See [FLAG_ACTIVITY_BROUGHT_TO_FRONT](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_BROUGHT_TO_FRONT) on the official Android documentation for more information.
1381
+ */
1382
+ BROUGHT_TO_FRONT = 8,
1383
+
1384
+ /**
1385
+ * See [FLAG_ACTIVITY_RESET_TASK_IF_NEEDED](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_RESET_TASK_IF_NEEDED) on the official Android documentation for more information.
1386
+ */
1387
+ RESET_TASK_IF_NEEDED = 9,
1388
+
1389
+ /**
1390
+ * See [FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) on the official Android documentation for more information.
1391
+ */
1392
+ LAUNCHED_FROM_HISTORY = 10,
1393
+
1394
+ /**
1395
+ * See [FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET) on the official Android documentation for more information.
1396
+ */
1397
+ CLEAR_WHEN_TASK_RESET = 11,
1398
+
1399
+ /**
1400
+ * See [FLAG_ACTIVITY_NEW_DOCUMENT](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NEW_DOCUMENT) on the official Android documentation for more information.
1401
+ */
1402
+ NEW_DOCUMENT = 12,
1403
+
1404
+ /**
1405
+ * See [FLAG_ACTIVITY_NO_USER_ACTION](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NO_USER_ACTION) on the official Android documentation for more information.
1406
+ */
1407
+ NO_USER_ACTION = 13,
1408
+
1409
+ /**
1410
+ * See [FLAG_ACTIVITY_REORDER_TO_FRONT](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_REORDER_TO_FRONT) on the official Android documentation for more information.
1411
+ */
1412
+ REORDER_TO_FRONT = 14,
1413
+
1414
+ /**
1415
+ * See [FLAG_ACTIVITY_NO_ANIMATION](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NO_ANIMATION) on the official Android documentation for more information.
1416
+ */
1417
+ NO_ANIMATION = 15,
1418
+
1419
+ /**
1420
+ * See [FLAG_ACTIVITY_CLEAR_TASK](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_TASK) on the official Android documentation for more information.
1421
+ */
1422
+ CLEAR_TASK = 16,
1423
+
1424
+ /**
1425
+ * See [FLAG_ACTIVITY_TASK_ON_HOME](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_TASK_ON_HOME) on the official Android documentation for more information.
1426
+ */
1427
+ TASK_ON_HOME = 17,
1428
+
1429
+ /**
1430
+ * See [FLAG_ACTIVITY_RETAIN_IN_RECENTS](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_RETAIN_IN_RECENTS) on the official Android documentation for more information.
1431
+ */
1432
+ RETAIN_IN_RECENTS = 18,
1433
+
1434
+ /**
1435
+ * See [FLAG_ACTIVITY_LAUNCH_ADJACENT](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_LAUNCH_ADJACENT) on the official Android documentation for more information.
1436
+ */
1437
+ LAUNCH_ADJACENT = 19,
1438
+
1439
+ /**
1440
+ * See [FLAG_ACTIVITY_MATCH_EXTERNAL](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_MATCH_EXTERNAL) on the official Android documentation for more information.
1441
+ */
1442
+ MATCH_EXTERNAL = 20,
1443
+ }