@transistorsoft/background-geolocation-types 5.0.0-beta.1

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 (109) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +137 -0
  3. package/dist/core/api/BackgroundGeolocation.d.ts +6 -0
  4. package/dist/core/api/BackgroundGeolocation.js +2 -0
  5. package/dist/core/api/CurrentPositionRequest.d.ts +44 -0
  6. package/dist/core/api/CurrentPositionRequest.js +2 -0
  7. package/dist/core/api/DeviceSettings.d.ts +77 -0
  8. package/dist/core/api/DeviceSettings.js +2 -0
  9. package/dist/core/api/Logger.d.ts +421 -0
  10. package/dist/core/api/Logger.js +2 -0
  11. package/dist/core/api/State.d.ts +75 -0
  12. package/dist/core/api/State.js +2 -0
  13. package/dist/core/config/ActivityConfig.d.ts +271 -0
  14. package/dist/core/config/ActivityConfig.js +2 -0
  15. package/dist/core/config/AppConfig.d.ts +599 -0
  16. package/dist/core/config/AppConfig.js +2 -0
  17. package/dist/core/config/AuthorizationConfig.d.ts +200 -0
  18. package/dist/core/config/AuthorizationConfig.js +2 -0
  19. package/dist/core/config/CompoundConfig.d.ts +19 -0
  20. package/dist/core/config/CompoundConfig.js +2 -0
  21. package/dist/core/config/Config.d.ts +149 -0
  22. package/dist/core/config/Config.js +2 -0
  23. package/dist/core/config/GeoConfig.d.ts +905 -0
  24. package/dist/core/config/GeoConfig.js +2 -0
  25. package/dist/core/config/HttpConfig.d.ts +579 -0
  26. package/dist/core/config/HttpConfig.js +2 -0
  27. package/dist/core/config/LocationFilter.d.ts +272 -0
  28. package/dist/core/config/LocationFilter.js +2 -0
  29. package/dist/core/config/LoggerConfig.d.ts +319 -0
  30. package/dist/core/config/LoggerConfig.js +2 -0
  31. package/dist/core/config/NotificationConfig.d.ts +519 -0
  32. package/dist/core/config/NotificationConfig.js +2 -0
  33. package/dist/core/config/PersistenceConfig.d.ts +552 -0
  34. package/dist/core/config/PersistenceConfig.js +2 -0
  35. package/dist/core/data/DeviceInfo.d.ts +61 -0
  36. package/dist/core/data/DeviceInfo.js +2 -0
  37. package/dist/core/data/Geofence.d.ts +16 -0
  38. package/dist/core/data/Geofence.js +2 -0
  39. package/dist/core/data/Location.d.ts +253 -0
  40. package/dist/core/data/Location.js +2 -0
  41. package/dist/core/data/Sensors.d.ts +30 -0
  42. package/dist/core/data/Sensors.js +2 -0
  43. package/dist/core/events/AuthorizationEvent.d.ts +15 -0
  44. package/dist/core/events/AuthorizationEvent.js +2 -0
  45. package/dist/core/events/ConnectivityChangeEvent.d.ts +9 -0
  46. package/dist/core/events/ConnectivityChangeEvent.js +2 -0
  47. package/dist/core/events/GeofenceEvent.d.ts +19 -0
  48. package/dist/core/events/GeofenceEvent.js +2 -0
  49. package/dist/core/events/GeofencesChangeEvent.d.ts +12 -0
  50. package/dist/core/events/GeofencesChangeEvent.js +2 -0
  51. package/dist/core/events/HeadlessEvent.d.ts +12 -0
  52. package/dist/core/events/HeadlessEvent.js +2 -0
  53. package/dist/core/events/HeartbeatEvent.d.ts +14 -0
  54. package/dist/core/events/HeartbeatEvent.js +2 -0
  55. package/dist/core/events/HttpEvent.d.ts +13 -0
  56. package/dist/core/events/HttpEvent.js +2 -0
  57. package/dist/core/events/MotionActivityEvent.d.ts +12 -0
  58. package/dist/core/events/MotionActivityEvent.js +2 -0
  59. package/dist/core/events/MotionChangeEvent.d.ts +12 -0
  60. package/dist/core/events/MotionChangeEvent.js +2 -0
  61. package/dist/core/events/ProviderChangeEvent.d.ts +17 -0
  62. package/dist/core/events/ProviderChangeEvent.js +2 -0
  63. package/dist/core/events/Subscription.d.ts +86 -0
  64. package/dist/core/events/Subscription.js +2 -0
  65. package/dist/docs-entry.d.ts +3 -0
  66. package/dist/docs-entry.js +20 -0
  67. package/dist/enums/AccuracyAuthorization.d.ts +16 -0
  68. package/dist/enums/AccuracyAuthorization.js +19 -0
  69. package/dist/enums/ActivityType.d.ts +28 -0
  70. package/dist/enums/ActivityType.js +31 -0
  71. package/dist/enums/AuthorizationStatus.d.ts +20 -0
  72. package/dist/enums/AuthorizationStatus.js +23 -0
  73. package/dist/enums/AuthorizationStrategy.d.ts +10 -0
  74. package/dist/enums/AuthorizationStrategy.js +13 -0
  75. package/dist/enums/DesiredAccuracy.d.ts +13 -0
  76. package/dist/enums/DesiredAccuracy.js +16 -0
  77. package/dist/enums/Event.d.ts +21 -0
  78. package/dist/enums/Event.js +24 -0
  79. package/dist/enums/GeofenceAction.d.ts +18 -0
  80. package/dist/enums/GeofenceAction.js +21 -0
  81. package/dist/enums/HttpMethod.d.ts +11 -0
  82. package/dist/enums/HttpMethod.js +14 -0
  83. package/dist/enums/KalmanProfile.d.ts +30 -0
  84. package/dist/enums/KalmanProfile.js +33 -0
  85. package/dist/enums/LocationError.d.ts +23 -0
  86. package/dist/enums/LocationError.js +26 -0
  87. package/dist/enums/LocationFilterPolicy.d.ts +108 -0
  88. package/dist/enums/LocationFilterPolicy.js +111 -0
  89. package/dist/enums/LogLevel.d.ts +13 -0
  90. package/dist/enums/LogLevel.js +16 -0
  91. package/dist/enums/LogLevelName.d.ts +1 -0
  92. package/dist/enums/LogLevelName.js +15 -0
  93. package/dist/enums/MotionActivityType.d.ts +14 -0
  94. package/dist/enums/MotionActivityType.js +17 -0
  95. package/dist/enums/NotificationPriority.d.ts +22 -0
  96. package/dist/enums/NotificationPriority.js +25 -0
  97. package/dist/enums/PersistMode.d.ts +12 -0
  98. package/dist/enums/PersistMode.js +15 -0
  99. package/dist/enums/SQLQueryOrder.d.ts +16 -0
  100. package/dist/enums/SQLQueryOrder.js +17 -0
  101. package/dist/enums/TrackingMode.d.ts +14 -0
  102. package/dist/enums/TrackingMode.js +17 -0
  103. package/dist/enums/TriggerActivity.d.ts +13 -0
  104. package/dist/enums/TriggerActivity.js +16 -0
  105. package/dist/index.d.ts +49 -0
  106. package/dist/index.js +69 -0
  107. package/dist/legacy/LegacyConfig.d.ts +24 -0
  108. package/dist/legacy/LegacyConfig.js +2 -0
  109. package/package.json +50 -0
@@ -0,0 +1,519 @@
1
+ import { NotificationPriority } from '../../enums/NotificationPriority';
2
+ /**
3
+ * __Android foreground notification__
4
+ *
5
+ * Android requires a persistent notification whenever the SDK runs its
6
+ * foreground service. This notification is shown in the system status bar
7
+ * while tracking is active.
8
+ *
9
+ * ![](https://dl.dropbox.com/s/acuhy5cu4p7uofr/android-foreground-service-default.png?dl=1)
10
+ *
11
+ * Configure this via {@link NotificationConfig} on {@link AppConfig.notification}.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * BackgroundGeolocation.ready({
16
+ * app: {
17
+ * notification: {
18
+ * title: "The Title",
19
+ * text: "The Text",
20
+ * }
21
+ * });
22
+ *
23
+ * // Update notification fields at runtime.
24
+ * // Only changed keys must be provided; existing values persist.
25
+ * BackgroundGeolocation.setConfig({
26
+ * app: {
27
+ * notification: {
28
+ * title: "The New Title",
29
+ * }
30
+ * }
31
+ * });
32
+ * ```
33
+ *
34
+ * __Custom Notification Layouts__
35
+ *
36
+ * Supply a custom Android Layout XML file using {@link NotificationConfig.layout}.
37
+ * This allows complete control over the appearance of the foreground notification.
38
+ *
39
+ * See the guide:
40
+ * **Android Custom Notification Layout** — (github:wiki/Android-Custom-Notification-Layout)
41
+ *
42
+ * @category Config
43
+ */
44
+ export interface NotificationConfig {
45
+ /**
46
+ * __Android notification priority__
47
+ *
48
+ * Android requires a persistent foreground-service notification.
49
+ * The `priority` option controls both:
50
+ *
51
+ * - The **order** of the notification in the system shade.
52
+ * - The **position/visibility** of the small status-bar icon.
53
+ *
54
+ * The following values are defined as static constants on
55
+ * {@link BackgroundGeolocation}:
56
+ *
57
+ * | Value | Description |
58
+ * |-----------------------------------------------------------|----------------------------------------------------------------------------------------------------------|
59
+ * | {@link NotificationPriority.Default} | Weighted toward the top of the notification list; status-bar icon left-aligned. |
60
+ * | {@link NotificationPriority.High} | Strongly weighted to the top; icon strongly left-aligned. |
61
+ * | {@link NotificationPriority.Low} | Weighted toward the bottom; icon right-aligned. |
62
+ * | {@link NotificationPriority.Max} | Equivalent to `NOTIFICATION_PRIORITY_HIGH`. |
63
+ * | {@link NotificationPriority.Min} | Strongly weighted to the bottom; icon hidden. |
64
+ *
65
+ * @example
66
+ * ```ts
67
+ * BackgroundGeolocation.ready({
68
+ * app: {
69
+ * foregroundService: true,
70
+ * notification: {
71
+ * priority: NotificationPriority.High
72
+ * }
73
+ * }
74
+ * });
75
+ * ```
76
+ *
77
+ */
78
+ priority?: NotificationPriority;
79
+ /**
80
+ * Configure the Android Foreground Service icon and notification to be displayed __always__. Defaults to `false`.
81
+ *
82
+ * The default behaviour is for the notification to be shown only while the SDK detects the device to be *moving*.
83
+ * Some developers desire to provide full-disclosure to their users when the SDK has been enabled.
84
+ */
85
+ sticky?: boolean;
86
+ /**
87
+ * Configure the *title* of the persistent notification in the Notification Bar.
88
+ *
89
+ * Defaults to the application name from `AndroidManifest`. Android requires a persistent notification for foreground-services. This will configure the **title** of that notification.
90
+ */
91
+ title?: string;
92
+ /**
93
+ * Configure the *text* of the persistent notification in the Notification Bar.
94
+ *
95
+ * Defaults to *"Location service activated"*. Android requires a persistent notification for foreground-services. This will configure the **text** of that notification.
96
+ */
97
+ text?: string;
98
+ /**
99
+ * Configure the *color* of the persistent notification icon in the Notification Bar.
100
+ *
101
+ * Defaults to `null`. Android requires a persistent notification for foreground-services. This will configure the **color** of the notification **icon** (API >= 21).
102
+ *
103
+ * Supported formats are:
104
+ * - `#RRGGBB`
105
+ * - `#AARRGGBB`
106
+ */
107
+ color?: string;
108
+ /**
109
+ * Configure the *small icon* of the persistent notification in the Notification Bar.
110
+ *
111
+ * Android requires a persistent notification in the Notification Bar. This allows you customize that icon. Defaults to your application icon.
112
+ *
113
+ * __⚠️ Warning:__
114
+ * - You must specify the **`type`** (`drawable|mipmap`) of resource you wish to use in the following format: `{type}/icon_name`
115
+ * - Do not append the file-extension (eg: `.png`)
116
+ *
117
+ * @example
118
+ * ```typescript
119
+ * // 1. drawable
120
+ * BackgroundGeolocation.ready({
121
+ * app: {
122
+ * notification: {
123
+ * smallIcon: "drawable/my_custom_notification_small_icon"
124
+ * }
125
+ * }
126
+ * });
127
+ *
128
+ * // 2. mipmap
129
+ * BackgroundGeolocation.ready({
130
+ * app: {
131
+ * notification: {
132
+ * smallIcon: "mipmap/my_custom_notification_small_icon"
133
+ * }
134
+ * }
135
+ * });
136
+ * ```
137
+ *
138
+ * __ℹ️ See also:__
139
+ * - {@link largeIcon}
140
+ */
141
+ smallIcon?: string;
142
+ /**
143
+ * Configure the *large icon* of the persistent notification in the Notification Bar.
144
+ *
145
+ * Android requires a persistent notification in the Notification Bar. This allows you customize that icon. Defaults to your application icon.
146
+ *
147
+ * __⚠️ Warning:__
148
+ * - You must specify the **`type`** (`drawable|mipmap`) of resource you wish to use in the following format: `{type}/icon_name`
149
+ * - Do not append the file-extension (eg: `.png`)
150
+ *
151
+ * @example
152
+ * ```typescript
153
+ * // 1. drawable
154
+ * BackgroundGeolocation.ready({
155
+ * app: {
156
+ * notification: {
157
+ * smallIcon: "drawable/my_custom_notification_small_icon"
158
+ * }
159
+ * });
160
+ *
161
+ * // 2. mipmap
162
+ * BackgroundGeolocation.ready({
163
+ * app: {
164
+ * notification: {
165
+ * smallIcon: "mipmap/my_custom_notification_small_icon"
166
+ * }
167
+ * }
168
+ * });
169
+ * ```
170
+ *
171
+ * __ℹ️ See also:__
172
+ * - {@link smallIcon}
173
+ */
174
+ largeIcon?: string;
175
+ /**
176
+ * __Custom Android Notification Layout__
177
+ *
178
+ * Specifies the name of your custom Android Layout XML file.
179
+ *
180
+ * __ℹ️ See:__
181
+ * - **[Android Custom Notification Layout](github:wiki/Android-Custom-Notification-Layout)** for full setup instructions.
182
+ *
183
+ * ![](https://dl.dropbox.com/s/whcb6q1gxxdk9t1/android-foreground-notification-transistor.png?dl=1)
184
+ *
185
+ * Even if you have no prior Android UI experience, custom layouts are very approachable.
186
+ * You will typically add `<TextView />`, `<ImageView />`, and `<Button />` elements.
187
+ *
188
+ * **Important:** Your `android:id` values **must be prefixed** with `notification`
189
+ * (e.g., `notificationText`, `notificationTitle`).
190
+ * The only exception is `applicationName`, which the SDK will populate with your app name.
191
+ *
192
+ * __Layout Special Elements__
193
+ *
194
+ * When the SDK renders your custom notification, it searches for the following IDs and
195
+ * sets their content from the associated data source:
196
+ *
197
+ * | Layout element `android:id` | Data source |
198
+ * |-------------------------------|---------------------------------------------|
199
+ * | `applicationName` | Application name from AndroidManifest |
200
+ * | `notificationTitle` | {@link title} |
201
+ * | `notificationText` | {@link text} |
202
+ * | `notificationSmallIcon` | {@link smallIcon} |
203
+ * | `notificationLargeIcon` | {@link largeIcon} |
204
+ *
205
+ * @example
206
+ * ```ts
207
+ * BackgroundGeolocation.ready({
208
+ * app: {
209
+ * notification: {
210
+ * layout: "my_notification_layout",
211
+ * title: "The Notification Title",
212
+ * text: "The Notification Text",
213
+ * smallIcon: "mipmap/my_small_icon",
214
+ * largeIcon: "mipmap/my_large_icon"
215
+ * }
216
+ * }
217
+ * });
218
+ * ```
219
+ *
220
+ * __Custom `<TextView />` Elements__
221
+ *
222
+ * You may define your own custom text fields and populate them using
223
+ * {@link strings}.
224
+ *
225
+ * @example
226
+ * ```xml
227
+ * <TextView
228
+ * android:id="@+id/myCustomElement"
229
+ * android:layout_width="match_parent"
230
+ * android:layout_height="wrap_content"
231
+ * android:text="notificationTitle" />
232
+ * ```
233
+ *
234
+ * @example
235
+ * ```ts
236
+ * BackgroundGeolocation.ready({
237
+ * app: {
238
+ * notification: {
239
+ * strings: {
240
+ * myCustomElement: "My Custom Element Text"
241
+ * }
242
+ * }
243
+ * }
244
+ * });
245
+ * ```
246
+ *
247
+ * __Custom `<Button />` Elements__
248
+ *
249
+ * Define your own buttons and register click listeners using
250
+ * {@link actions}.
251
+ *
252
+ * @example
253
+ * ```xml
254
+ * <Button
255
+ * android:id="@+id/notificationButtonFoo"
256
+ * style="@style/Widget.AppCompat.Button.Small"
257
+ * android:layout_width="60dp"
258
+ * android:layout_height="40dp"
259
+ * android:text="Foo" />
260
+ * ```
261
+ *
262
+ * @example
263
+ * ```ts
264
+ * BackgroundGeolocation.ready({
265
+ * app: {
266
+ * notification: {
267
+ * actions: [
268
+ * "notificationButtonFoo",
269
+ * "notificationButtonBar"
270
+ * ]
271
+ * }
272
+ * }
273
+ * });
274
+ *
275
+ * BackgroundGeolocation.onNotificationAction((buttonId) => {
276
+ * console.log("[onNotificationAction]", buttonId);
277
+ * switch (buttonId) {
278
+ * case "notificationButtonFoo":
279
+ * break;
280
+ * case "notificationButtonBar":
281
+ * break;
282
+ * }
283
+ * });
284
+ * ```
285
+ *
286
+ * __Sample Layout__
287
+ *
288
+ * As a starting point, copy this into your XML file:
289
+ *
290
+ * @example
291
+ * ```xml
292
+ * <?xml version="1.0" encoding="utf-8"?>
293
+ * <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
294
+ * xmlns:tools="http://schemas.android.com/tools"
295
+ * android:layout_width="match_parent"
296
+ * android:layout_height="135dp"
297
+ * android:gravity="start"
298
+ * android:orientation="vertical"
299
+ * android:padding="15dp">
300
+ *
301
+ * <LinearLayout
302
+ * android:layout_width="match_parent"
303
+ * android:layout_height="wrap_content"
304
+ * android:layout_marginBottom="15dp"
305
+ * android:gravity="center"
306
+ * android:orientation="horizontal">
307
+ *
308
+ * <ImageView
309
+ * android:id="@+id/notificationSmallIcon"
310
+ * android:layout_width="16dp"
311
+ * android:layout_height="16dp"
312
+ * android:tint="@android:color/background_dark"
313
+ * tools:srcCompat="@tools:sample/avatars" />
314
+ *
315
+ * <TextView
316
+ * android:id="@+id/applicationName"
317
+ * android:layout_width="match_parent"
318
+ * android:layout_height="match_parent"
319
+ * android:paddingLeft="10dp"
320
+ * android:text="applicationName"
321
+ * android:textAppearance="@style/TextAppearance.Compat.Notification.Title"
322
+ * android:textColor="#888888"
323
+ * android:textSize="12sp" />
324
+ * </LinearLayout>
325
+ *
326
+ * <TextView
327
+ * android:id="@+id/notificationTitle"
328
+ * style="@style/TextAppearance.Compat.Notification.Title"
329
+ * android:layout_width="match_parent"
330
+ * android:layout_height="wrap_content"
331
+ * android:text="notificationTitle"
332
+ * android:textSize="14sp" />
333
+ *
334
+ * <TextView
335
+ * android:id="@+id/notificationText"
336
+ * style="@style/TextAppearance.Compat.Notification.Line2"
337
+ * android:layout_width="match_parent"
338
+ * android:layout_height="wrap_content"
339
+ * android:text="notificationText"
340
+ * android:textSize="14sp" />
341
+ *
342
+ * <LinearLayout
343
+ * android:layout_width="match_parent"
344
+ * android:layout_height="wrap_content"
345
+ * android:gravity="right"
346
+ * android:orientation="horizontal">
347
+ *
348
+ * <Button
349
+ * android:id="@+id/notificationButtonFoo"
350
+ * style="@style/Widget.AppCompat.Button.Small"
351
+ * android:layout_width="60dp"
352
+ * android:layout_height="40dp"
353
+ * android:text="FooA" />
354
+ *
355
+ * <Button
356
+ * android:id="@+id/notificationButtonBar"
357
+ * style="@style/Widget.AppCompat.Button.Small"
358
+ * android:layout_width="60dp"
359
+ * android:layout_height="40dp"
360
+ * android:text="Bar" />
361
+ * </LinearLayout>
362
+ * </LinearLayout>
363
+ * ```
364
+ *
365
+ * ![](https://dl.dropbox.com/s/k2l0oaqk86axfgu/android-custom-layout-elements.png?dl=1)
366
+ *
367
+ * __Using your custom layout__
368
+ *
369
+ * @example
370
+ * ```ts
371
+ * BackgroundGeolocation.ready({
372
+ * app: {
373
+ * notification: {
374
+ * title: "The title",
375
+ * text: "The text",
376
+ * layout: "notification_layout",
377
+ * actions: [
378
+ * "notificationButtonFoo",
379
+ * "notificationButtonBar"
380
+ * ],
381
+ * strings: {
382
+ * myCustomTextBox1: "custom TextBox element"
383
+ * }
384
+ * }
385
+ * }
386
+ * });
387
+ *
388
+ * BackgroundGeolocation.onNotificationAction((buttonId) => {
389
+ * console.log("[onNotificationAction]", buttonId);
390
+ * switch (buttonId) {
391
+ * case "notificationButtonFoo":
392
+ * break;
393
+ * case "notificationButtonBar":
394
+ * break;
395
+ * }
396
+ * });
397
+ * ```
398
+ */
399
+ layout?: string;
400
+ /**
401
+ * Custom strings to render into `<TextView />` elements of a custom notification [[layout]].
402
+ *
403
+ * ℹ️ See [Android Custom Notification Layout](github:wiki/Android-Custom-Notification-Layout) for setup instructions.
404
+ *
405
+ * You can declare your own custom `<TextView />` elements and render data into them using the `notification.strings` parameter.
406
+ *
407
+ * @example
408
+ * ```xml
409
+ * <TextView
410
+ * android:id="@+id/myCustomElement" // <-- myCustomElement
411
+ * android:layout_width="match_parent"
412
+ * android:layout_height="wrap_content"
413
+ * android:text="notificationTitle" />
414
+ * ```
415
+ *
416
+ * You can provide data to your custom elements using the [[strings]] configuration parameter:
417
+ *
418
+ * @example
419
+ * ```typescript
420
+ * BackgroundGeolocation.ready({
421
+ * app: {
422
+ * notification: {
423
+ * strings: {
424
+ * myCustomElement: "My Custom Element Text"
425
+ * }
426
+ * }
427
+ * }
428
+ * });
429
+ * ```
430
+ */
431
+ strings?: Record<string, string>;
432
+ /**
433
+ * Declare click listeners for `<Button />` elements of a custom notification {@link layout}.
434
+ *
435
+ * ![](https://dl.dropbox.com/s/whcb6q1gxxdk9t1/android-foreground-notification-transistor.png?dl=1)
436
+ *
437
+ * ℹ️ See [Android Custom Notification Layout](github:wiki/Android-Custom-Notification-Layout) for setup instructions.
438
+ *
439
+ * You can declare custom Android `<Button />` elements in your layout XML and
440
+ * register click listeners for them using the {@link actions} parameter.
441
+ *
442
+ * __Example: Custom `<Button />` element__
443
+ *
444
+ * ```xml
445
+ * <Button
446
+ * android:id="@+id/notificationButtonPause" <!-- notificationButtonPause -->
447
+ * style="@style/Widget.AppCompat.Button.Small"
448
+ * android:layout_width="60dp"
449
+ * android:layout_height="40dp"
450
+ * android:text="Foo" />
451
+ * ```
452
+ *
453
+ * __Example: Register button listeners__
454
+ *
455
+ * ```ts
456
+ * BackgroundGeolocation.ready({
457
+ * app: {
458
+ * notification: {
459
+ * actions: [
460
+ * "notificationButtonPause" // <-- register button listeners
461
+ * ]
462
+ * }
463
+ * }
464
+ * });
465
+ *
466
+ * // Listen to custom button clicks:
467
+ * BackgroundGeolocation.onNotificationAction((buttonId) => {
468
+ * console.log("[onNotificationAction] - ", buttonId);
469
+ * switch (buttonId) {
470
+ * case "notificationButtonPause":
471
+ * BackgroundGeolocation.changePace(false);
472
+ * break;
473
+ * // ...
474
+ * }
475
+ * });
476
+ * ```
477
+ */
478
+ actions?: string[];
479
+ /**
480
+ * Configure the name of the plugin's notification-channel used to display the required, persistent foreground notification.
481
+ *
482
+ * On Android O+, the plugin's foreground-service needs to create a "Notification Channel". The name of this channel can be seen in:
483
+ * > `Settings->App & Notifications->Your App.`
484
+ *
485
+ * Defaults to your application's name from `AndroidManifest`.
486
+ *
487
+ * ![](https://dl.dropboxusercontent.com/s/zgcxau7lyjfuaw9/android-notificationChannelName.png?dl=1)\
488
+ *
489
+ *
490
+ * @example
491
+ * ```typescript
492
+ * BackgroundGeolocation.ready({
493
+ * app: {
494
+ * notification: {
495
+ * channelName: "Location Tracker"
496
+ * }
497
+ * }
498
+ * });
499
+ *
500
+ * // or with #setConfig
501
+ * BackgroundGeolocation.setConfig({
502
+ * app: {
503
+ * notification: {
504
+ * channelName: "My new channel name"
505
+ * }
506
+ * }
507
+ * });
508
+ * ```
509
+ */
510
+ channelName?: string;
511
+ /**
512
+ * Customize the notification channel ID.
513
+ *
514
+ * Defaults to `your.package.name.TSLocationManager`
515
+ *
516
+ * __NOTE__: It is not typically required to change this. Typical use-cases are for users who use an existing Android foreground-service who wish the SDK to share an existing notification and channel.
517
+ */
518
+ channelId?: string;
519
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });