@selligent-marketing-cloud/selligent-react-native 2.3.0 → 2.7.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 (79) hide show
  1. package/README.md +311 -315
  2. package/RNSelligent.podspec +3 -4
  3. package/android/build.gradle +39 -31
  4. package/android/libs/sdk-release.aar +0 -0
  5. package/android/src/main/java/com/selligent/RNSelligent.java +41 -18
  6. package/android/src/main/java/com/selligent/SMSettingsFactory.java +1 -1
  7. package/android/src/main/java/com/selligent/Settings.java +14 -7
  8. package/constants.d.ts +18 -12
  9. package/constants.js +29 -25
  10. package/index.android.js +42 -0
  11. package/index.d.ts +14 -12
  12. package/index.ios.js +12 -29
  13. package/index.js +11 -31
  14. package/ios/ClientSettings.h +2 -1
  15. package/ios/ClientSettings.m +4 -2
  16. package/ios/EnumMapper.h +3 -8
  17. package/ios/EnumMapper.m +8 -26
  18. package/ios/RNSelligent.m +25 -27
  19. package/ios/RemoteMessageDisplayType.h +5 -0
  20. package/ios/SMManagerSetting+ClientSettings.m +10 -4
  21. package/ios/SelligentReactNative.xcodeproj/project.pbxproj +4 -12
  22. package/ios/include/SMBaseMessage.h +8 -12
  23. package/ios/include/SMBlock.h +2 -2
  24. package/ios/include/SMClearCache.h +0 -2
  25. package/ios/include/SMContentAlignment.h +1 -2
  26. package/ios/include/SMDeviceInfos.h +10 -8
  27. package/ios/include/SMDisplayMode.h +1 -2
  28. package/ios/include/SMEvent.h +20 -16
  29. package/ios/include/SMEventUser.h +0 -1
  30. package/ios/include/SMEventUserLogin.h +11 -16
  31. package/ios/include/SMEventUserLogout.h +12 -16
  32. package/ios/include/SMEventUserRegistration.h +12 -17
  33. package/ios/include/SMEventUserUnregistration.h +12 -16
  34. package/ios/include/SMFailure.h +1 -6
  35. package/ios/include/SMHelper.h +7 -2
  36. package/ios/include/SMInAppContentHTMLViewController.h +11 -9
  37. package/ios/include/SMInAppContentImageViewController.h +6 -6
  38. package/ios/include/SMInAppContentMessage.h +12 -12
  39. package/ios/include/SMInAppContentStyleOptions.h +91 -79
  40. package/ios/include/SMInAppContentType.h +2 -3
  41. package/ios/include/SMInAppContentURLViewController.h +10 -9
  42. package/ios/include/SMInAppContentViewController.h +3 -6
  43. package/ios/include/SMInAppMessage.h +22 -14
  44. package/ios/include/SMInAppMessageType.h +2 -6
  45. package/ios/include/SMInAppRefreshType.h +1 -1
  46. package/ios/include/SMLink.h +7 -11
  47. package/ios/include/SMLog.h +1 -1
  48. package/ios/include/SMManager+DataTransaction.h +6 -13
  49. package/ios/include/SMManager+InAppContent.h +20 -23
  50. package/ios/include/SMManager+InAppMessage.h +65 -42
  51. package/ios/include/SMManager+Log.h +3 -14
  52. package/ios/include/SMManager+RemoteNotification.h +38 -34
  53. package/ios/include/SMManager+SMEvent.h +10 -10
  54. package/ios/include/SMManager+SMLink.h +44 -0
  55. package/ios/include/SMManager+SilentPush.h +5 -22
  56. package/ios/include/SMManager+StyleOptions.h +5 -8
  57. package/ios/include/SMManager+UserNotification.h +45 -33
  58. package/ios/include/SMManager+ViewController.h +45 -0
  59. package/ios/include/SMManager.h +14 -23
  60. package/ios/include/SMManagerInAppMessageDelegate.h +24 -0
  61. package/ios/include/SMManagerSetting.h +61 -33
  62. package/ios/include/SMManagerSettingIAC.h +6 -17
  63. package/ios/include/SMManagerSettingIAM.h +7 -16
  64. package/ios/include/SMManagerUniversalLinksDelegate.h +23 -0
  65. package/ios/include/SMMessage.h +1 -3
  66. package/ios/include/SMNSNotification.h +19 -5
  67. package/ios/include/SMNotificationAnnotationData.h +4 -8
  68. package/ios/include/SMNotificationButtonData.h +1 -6
  69. package/ios/include/SMNotificationButtonType.h +1 -14
  70. package/ios/include/SMNotificationMessage.h +31 -0
  71. package/ios/include/SMRemoteMessageDisplayType.h +32 -0
  72. package/ios/include/SMSuccess.h +1 -4
  73. package/ios/{libSelligentMobile2.5.2.a → libSelligentMobile.a} +0 -0
  74. package/package.json +3 -3
  75. package/trigger.yml +9 -0
  76. package/ios/LocationAuthorisationStatus.h +0 -6
  77. package/ios/LocationAuthorisationType.h +0 -4
  78. package/ios/include/SMLocationAuthorisationType.h +0 -57
  79. package/ios/include/SMManager+Location.h +0 -97
package/README.md CHANGED
@@ -4,20 +4,29 @@ This module provides an API for the usage of the Selligent SDK in React Native.
4
4
 
5
5
  ## Supported platforms
6
6
 
7
- * Android
8
- * iOS
7
+ - Android
8
+ - iOS
9
+
10
+ > _**Important:** Since version 2.6.0 of this module we require your app to use the Android Gradle Plugin version 4.2.0 or higher in order to build on Android. This is the default Android Gradle Plugin version since React Native version 0.64.0 but can be manually increased in older versions of React Native._
11
+
12
+ This module uses the native Selligent SDKs:
13
+
14
+ | SDK | Version |
15
+ | ----------------------------------------------------------------------- | ------- |
16
+ | [Android](https://github.com/SelligentMarketingCloud/MobileSDK-Android) | 3.8.0 |
17
+ | [iOS](https://github.com/SelligentMarketingCloud/MobileSDK-iOS) | 2.7.1 |
9
18
 
10
19
  ## ToC
11
20
 
12
- * [Installation](#installation)
13
- * [Android Specific Installation](#android-specific-installation)
14
- * [iOS Specific Installation](#ios-specific-installation)
15
- * [Using the API](#using-the-api)
16
- * [API Reference](#api-reference)
17
- * [Methods](#methods)
18
- * [Android Only/Specific Methods](#android-onlyspecific-methods)
19
- * [iOS Only/Specific Methods](#ios-onlyspecific-methods)
20
- * [Constants](#constants)
21
+ - [Installation](#installation)
22
+ - [Android Specific Installation](#android-specific-installation)
23
+ - [iOS Specific Installation](#ios-specific-installation)
24
+ - [Using the API](#using-the-api)
25
+ - [API Reference](#api-reference)
26
+ - [Methods](#methods)
27
+ - [Android Only/Specific Methods](#android-onlyspecific-methods)
28
+ - [iOS Only/Specific Methods](#ios-onlyspecific-methods)
29
+ - [Constants](#constants)
21
30
 
22
31
  ## Installation
23
32
 
@@ -31,10 +40,10 @@ This module provides an API for the usage of the Selligent SDK in React Native.
31
40
 
32
41
  ```json
33
42
  {
34
- "url": "someMobilePushUrl",
35
- "clientId": "someClientId",
36
- "privateKey": "somePrivateKey",
37
- "fullyQualifiedNotificationActivityClassName": "com.some.project.MainActivity"
43
+ "url": "someMobilePushUrl",
44
+ "clientId": "someClientId",
45
+ "privateKey": "somePrivateKey",
46
+ "fullyQualifiedNotificationActivityClassName": "com.some.project.MainActivity"
38
47
  }
39
48
  ```
40
49
 
@@ -42,28 +51,68 @@ This module provides an API for the usage of the Selligent SDK in React Native.
42
51
 
43
52
  **Detailed overview:**
44
53
 
45
- | Property | Type | Required | Platform |
46
- | ------------------------------------------- | --------------------------------------------------------------------------------------------- | -------- | ------------ |
47
- | url | string | Yes | Both |
48
- | clientId | string | Yes | Both |
49
- | privateKey | string | Yes | Both |
50
- | clearCacheIntervalValue | enum [Selligent.ClearCacheIntervalValue](#selligentclearcacheintervalvalue) | No | Both |
51
- | configureLocationServices | boolean | No | Both |
52
- | inAppMessageRefreshType | enum [Selligent.InAppMessageRefreshType](#selligentinappmessagerefreshtype) | No | Both |
53
- | appGroupId | string | No | iOS Only |
54
- | shouldClearBadge | boolean | No | iOS Only |
55
- | shouldDisplayRemoteNotification | boolean | No | iOS Only |
56
- | shouldPerformBackgroundFetch | boolean | No | iOS Only |
57
- | doNotListenToThePush | boolean | No | Android Only |
58
- | doNotFetchTheToken | boolean | No | Android Only |
59
- | loadCacheAsynchronously | boolean | No | Android Only |
60
- | fullyQualifiedNotificationActivityClassName | string | No | Android Only |
61
- | remoteMessageDisplayType | enum [Selligent.AndroidRemoteMessagesDisplayType](#selligentAndroidRemoteMessagesDisplayType) | No | Android Only |
62
-
63
-
54
+ | Property | Type | Required | Platform |
55
+ | ------------------------------------------- | ------------------------------------------------------------------------------- | -------- | ------------ |
56
+ | url | string | Yes | Both |
57
+ | clientId | string | Yes | Both |
58
+ | privateKey | string | Yes | Both |
59
+ | clearCacheIntervalValue | enum [Selligent.ClearCacheIntervalValue](#selligentclearcacheintervalvalue) | No | Both |
60
+ | inAppMessageRefreshType | enum [Selligent.InAppMessageRefreshType](#selligentinappmessagerefreshtype) | No | Both |
61
+ | addInAppMessageFromPushToInAppMessageList | boolean | No | Both |
62
+ | remoteMessageDisplayType | enum [Selligent.RemoteMessagesDisplayType](#selligentremotemessagesdisplaytype) | No | Both |
63
+ | appGroupId | string | No | iOS Only |
64
+ | shouldClearBadge | boolean | No | iOS Only |
65
+ | shouldDisplayRemoteNotification | boolean | No | iOS Only |
66
+ | shouldPerformBackgroundFetch | boolean | No | iOS Only |
67
+ | doNotListenToThePush | boolean | No | Android Only |
68
+ | doNotFetchTheToken | boolean | No | Android Only |
69
+ | loadCacheAsynchronously | boolean | No | Android Only |
70
+ | fullyQualifiedNotificationActivityClassName | string | No | Android Only |
71
+ | notificationIconColor | string | No | Android Only |
72
+
73
+
64
74
 
65
75
  ### Android Specific Installation
66
76
 
77
+ > ### **Atention for Huawei developers!**
78
+ >
79
+ > In order to use this module on Huawei devices (without Goggle Play services), you should add the following dependencies in the `build.gradle` files of the Android project in your React Native project:
80
+ >
81
+ > In your Android project's root `build.gradle` file:
82
+ >
83
+ > ```gradle
84
+ >
85
+ > buildscript {
86
+ > repositories {
87
+ > maven { url 'https://developer.huawei.com/repo/' }
88
+ > }
89
+ > dependencies {
90
+ > classpath: 'com.huawei.agconnect.agcp:1.6.0.300'
91
+ > }
92
+ > }
93
+ >
94
+ > allProjects: {
95
+ > repositories: {
96
+ > maven: { url 'https://developer.huawei.com/repo/' }
97
+ > }
98
+ > }
99
+ >
100
+ > ```
101
+ >
102
+ > In your app module's `build.gradle` file:
103
+ >
104
+ > ```gradle
105
+ >
106
+ > apply plugin 'com.huawei.agconnect'
107
+ >
108
+ > dependencies {
109
+ > api 'com.huawei.hms:base:6.2.0.300'
110
+ > api 'com.huawei.hms:push:6.1.0.300'
111
+ > api 'com.huawei.hms:maps:6.2.0.301'
112
+ > }
113
+ >
114
+ > ```
115
+
67
116
  <details>
68
117
  <summary>Without autolinking (RN 0.59 and below)</summary>
69
118
 
@@ -95,11 +144,6 @@ This module provides an API for the usage of the Selligent SDK in React Native.
95
144
  flatDir {
96
145
  dirs "$rootDir/../node_modules/@selligent-marketing-cloud/selligent-react-native/android/libs"
97
146
  }
98
-
99
- // Add the following:
100
- maven {
101
- url 'https://maven-repo.plotprojects.com'
102
- }
103
147
  }
104
148
  }
105
149
  ```
@@ -131,7 +175,7 @@ This module provides an API for the usage of the Selligent SDK in React Native.
131
175
  ...
132
176
  @Override
133
177
  protected List<ReactPackage> getPackages() {
134
-
178
+
135
179
  List<ReactPackage> packages = new PackageList(this).getPackages();
136
180
  // Add the following:
137
181
  packages.add(new RNSelligentPackage());
@@ -183,11 +227,6 @@ This module provides an API for the usage of the Selligent SDK in React Native.
183
227
  flatDir {
184
228
  dirs "$rootDir/../node_modules/@selligent-marketing-cloud/selligent-react-native/android/libs"
185
229
  }
186
-
187
- // Add the following:
188
- maven {
189
- url 'https://maven-repo.plotprojects.com'
190
- }
191
230
  }
192
231
  }
193
232
  ```
@@ -221,7 +260,6 @@ This module provides an API for the usage of the Selligent SDK in React Native.
221
260
 
222
261
  </details>
223
262
 
224
-
225
263
  #### Change default push notification icons
226
264
 
227
265
  Add the following properties to the `selligent.json` file:
@@ -233,7 +271,6 @@ Add the following properties to the `selligent.json` file:
233
271
 
234
272
  > _Note: only parse the name of the icon, without the path. The icon should reside in the res/drawable folder of the Android project, as explained in [Android's official guide](https://developer.android.com/guide/topics/resources/drawable-resource#BitmapFile)._
235
273
 
236
-
237
274
  ### iOS Specific installation
238
275
 
239
276
  <details>
@@ -253,17 +290,9 @@ Add the following properties to the `selligent.json` file:
253
290
 
254
291
  4. Add Selligent to `Header Search Paths` in `Build Settings` of your target:
255
292
 
256
- ```
257
- $(SRCROOT)/../node_modules/@selligent-marketing-cloud/selligent-react-native/ios/
258
- ```
259
-
260
-
261
-
262
- 4. Add Selligent to `Header Search Paths` in `Build Settings` of your target:
263
-
264
- ```
265
- $(SRCROOT)/../node_modules/@selligent-marketing-cloud/selligent-react-native/ios/
266
- ```
293
+ ```
294
+ $(SRCROOT)/../node_modules/@selligent-marketing-cloud/selligent-react-native/ios/
295
+ ```
267
296
 
268
297
  5. Create a `Podfile` (if there isn't one already) in the `/ios` folder and add the following:
269
298
 
@@ -303,13 +332,11 @@ Add the following properties to the `selligent.json` file:
303
332
 
304
333
  </details>
305
334
 
306
-
307
-
308
335
  #### Push notifications
309
336
 
310
337
  1. For push notifications you need to delegate some of the `AppDelegate.m` methods to the SDK:
311
338
 
312
- ````objective-c
339
+ ```objective-c
313
340
  #import "AppDelegate.h"
314
341
  #import <React/RCTBundleURLProvider.h>
315
342
  #import <React/RCTRootView.h>
@@ -370,22 +397,20 @@ Add the following properties to the `selligent.json` file:
370
397
  #endif
371
398
 
372
399
  @end
373
- ````
400
+ ```
374
401
 
375
- 2. Follow section 4 **Configure the APNS (Apple Push Notification Service)**, of the **IOS - Using the SDK** pdf.
402
+ 2. Follow section [**Create an APNS Key**](https://github.com/SelligentMarketingCloud/MobileSDK-iOS/tree/master/Documentation#apns_key), of the native documentation.
376
403
 
377
404
  3. If you want rich push notifications, follow section 6.9 **Notification Extensions** as well.
378
405
  Make sure you add your `appGroupId` to the `selligent.json`.
379
406
  > **IMPORTANT!** make sure your `appGroupId` has the following structure or it will not work: `group.{MAIN_APP_BUNDLE_ID}`
380
407
 
381
- #### Geolocation
382
-
383
- For geolocation services, follow section 6.5 **Geolocation**, of the **IOS - Using the SDK** pdf. You also need to configure several permissions described in 5.3.3 **Permission for geo location**.
384
-
385
408
  #### Deeplinking
409
+
386
410
  You can catch the deeplinks 2 ways:
387
411
 
388
412
  1. Native in AppDelegate.m, add the following (example code that logs the URL)
413
+
389
414
  ```
390
415
  -(BOOL)application:(UIApplication*) application openURL:(NSURL*) url sourceApplication:(NSString*) sourceApplication annotation:(id) annotation
391
416
  {
@@ -403,13 +428,13 @@ You can catch the deeplinks 2 ways:
403
428
  1. Add the `Button` import statement:
404
429
 
405
430
  ```javascript
406
- import {Platform, StyleSheet, Text, View, Button} from 'react-native'; // Add Button import
431
+ import { Platform, StyleSheet, Text, View, Button } from "react-native"; // Add Button import
407
432
  ```
408
433
 
409
434
  2. Add the `Selligent` import statement:
410
435
 
411
436
  ```javascript
412
- import Selligent from '@selligent-marketing-cloud/selligent-react-native' // Add Selligent import
437
+ import Selligent from "@selligent-marketing-cloud/selligent-react-native"; // Add Selligent import
413
438
  ```
414
439
 
415
440
  3. Add a function to call the `Selligent.getVersionLib` function:
@@ -447,138 +472,136 @@ You can catch the deeplinks 2 ways:
447
472
  5. Your `App.js` file should look something like this:
448
473
 
449
474
  ```javascript
450
- import React, {Component} from 'react';
451
- import {Platform, StyleSheet, Text, View, Button} from 'react-native'; // Add Button import
452
- import Selligent from '@selligent-marketing-cloud/selligent-react-native' // Add Selligent import
475
+ import React, { Component } from "react";
476
+ import { Platform, StyleSheet, Text, View, Button } from "react-native"; // Add Button import
477
+ import Selligent from "@selligent-marketing-cloud/selligent-react-native"; // Add Selligent import
453
478
 
454
479
  const instructions = Platform.select({
455
- ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
456
- android:
457
- 'Double tap R on your keyboard to reload,\n' +
458
- 'Shake or press menu button for dev menu',
480
+ ios: "Press Cmd+R to reload,\n" + "Cmd+D or shake for dev menu",
481
+ android:
482
+ "Double tap R on your keyboard to reload,\n" +
483
+ "Shake or press menu button for dev menu",
459
484
  });
460
485
 
461
486
  type Props = {};
462
487
  export default class App extends Component<Props> {
488
+ // Add example function
489
+ _getVersionLib() {
490
+ Selligent.getVersionLib((versionLib) => {
491
+ alert(versionLib);
492
+ });
493
+ }
463
494
 
464
- // Add example function
465
- _getVersionLib() {
466
- Selligent.getVersionLib((versionLib) => {
467
- alert(versionLib);
468
- })
469
- }
470
-
471
- render() {
472
- return (
473
- <View style={styles.container}>
474
- <Text style={styles.welcome}>Welcome to React Native!</Text>
475
- <Text style={styles.instructions}>To get started, edit App.js</Text>
476
- <Text style={styles.instructions}>{instructions}</Text>
477
- // Add button
478
- <Button
479
- onPress={this._getVersionLib}
480
- title='getVersionLib'
481
- />
482
- </View>
483
- );
484
- }
495
+ render() {
496
+ return (
497
+ <View style={styles.container}>
498
+ <Text style={styles.welcome}>Welcome to React Native!</Text>
499
+ <Text style={styles.instructions}>
500
+ To get started, edit App.js
501
+ </Text>
502
+ <Text style={styles.instructions}>{instructions}</Text>
503
+ // Add button
504
+ <Button onPress={this._getVersionLib} title="getVersionLib" />
505
+ </View>
506
+ );
507
+ }
485
508
  }
486
509
 
487
510
  const styles = StyleSheet.create({
488
- container: {
489
- flex: 1,
490
- justifyContent: 'center',
491
- alignItems: 'center',
492
- backgroundColor: '#F5FCFF',
493
- },
494
- welcome: {
495
- fontSize: 20,
496
- textAlign: 'center',
497
- margin: 10,
498
- },
499
- instructions: {
500
- textAlign: 'center',
501
- color: '#333333',
502
- marginBottom: 5,
503
- },
511
+ container: {
512
+ flex: 1,
513
+ justifyContent: "center",
514
+ alignItems: "center",
515
+ backgroundColor: "#F5FCFF",
516
+ },
517
+ welcome: {
518
+ fontSize: 20,
519
+ textAlign: "center",
520
+ margin: 10,
521
+ },
522
+ instructions: {
523
+ textAlign: "center",
524
+ color: "#333333",
525
+ marginBottom: 5,
526
+ },
504
527
  });
505
528
  ```
506
529
 
507
530
  ## API Reference
508
531
 
509
- * [Methods](#methods)
510
- * [Selligent.getVersionLib(successCallback)](#selligentgetversionlibsuccesscallback)
511
- * [getVersionLib example](#getversionlib-example)
512
- * [Selligent.enableGeolocation(successCallback, errorCallback, enabled)](#selligentenablegeolocationsuccesscallback-errorcallback-enabled)
513
- * [enableGeolocation example](#enablegeolocation-example)
514
- * [Selligent.isGeolocationEnabled(successCallback)](#selligentisgeolocationenabledsuccesscallback)
515
- * [isGeolocationEnabled example](#isgeolocationenabled-example)
516
- * [Selligent.enableNotifications(successCallback, errorCallback, enabled)](#selligentenablenotificationssuccesscallback-errorcallback-enabled)
517
- * [enableNotifications example](#enablenotifications-example)
518
- * [Selligent.displayLastReceivedRemotePushNotification(successCallback)](#selligentdisplaylastreceivedremotepushnotificationsuccesscallback)
519
- * [displayLastReceivedRemotePushNotification example](#displaylastreceivedremotepushnotification-example)
520
- * [Selligent.getLastRemotePushNotification(successCallback)](#selligentgetlastremotepushnotificationsuccesscallback)
521
- * [getLastRemotePushNotification Example](#getlastremotepushnotification-example)
522
- * [Selligent.enableInAppMessages(successCallback, errorCallback, enabled)](#selligentenableinappmessagessuccesscallback-errorcallback-enabled)
523
- * [enableInAppMessages example](#enableinappmessages-example)
524
- * [Selligent.getInAppMessages(successCallback)](#selligentgetinappmessagessuccesscallback)
525
- * [getInAppMessages example](#getinappmessages-example)
526
- * [Selligent.setInAppMessageAsSeen(successCallback, errorCallback, messageId)](#selligentsetinappmessageasseensuccesscallback-errorcallback-messageid)
527
- * [setInAppMessageAsSeen example](#setinappmessageasseen-example)
528
- * [Selligent.executeButtonAction(successCallback, errorCallback, buttonId, messageId)](#selligentexecutebuttonactionsuccesscallback-errorcallback-buttonid-messageid)
529
- * [executeButtonAction example](#executeButtonAction-example)
530
- * [Selligent.sendEvent(successCallback, errorCallback, event)](#selligentsendeventsuccesscallback-errorcallback-event)
531
- * [sendEvent example](#sendevent-example)
532
- * [Selligent.subscribeToEvents(successCallback, errorCallback, eventCallback)](#selligentsubscribetoeventssuccesscallback-errorcallback-eventcallback)
533
- * [subscribeToEvents example](#subscribetoevents-example)
534
-
535
- * [Android Only/Specific Methods](#android-onlyspecific-methods)
536
- * [Selligent.subscribeToEvent(eventCallback, eventName)](#selligentsubscribetoeventeventcallback-eventname)
537
- * [subscribeToEvent example](#subscribetoevent-example)
538
- * [Selligent.areInAppMessagesEnabled(successCallback)](#selligentareinappmessagesenabledsuccesscallback)
539
- * [areInAppMessagesEnabled example](#areinappmessagesenabled-example)
540
- * [Selligent.enableAndroidLogging(successCallback, errorCallback, enabled)](#selligentenableandroidloggingsuccesscallback-errorcallback-enabled)
541
- * [enableAndroidLogging example](#enableandroidlogging-example)
542
- * [Selligent.displayMessage(successCallback, errorCallback, messageId)](#selligentdisplaymessagesuccesscallback-errorcallback-messageid)
543
- * [displayMessage example](#displaymessage-example)
544
- * [Selligent.areNotificationsEnabled(successCallback)](#selligentarenotificationsenabledsuccesscallback)
545
- * [areNotificationsEnabled example](#arenotificationsenabled-example)
546
- * [Selligent.setNotificationSmallIcon(successCallback, errorCallback, iconName)](#selligentsetnotificationsmalliconsuccesscallback-errorcallback-iconname)
547
- * [setNotificationSmallIcon example](#setnotificationsmallicon-example)
548
- * [Selligent.setNotificationLargeIcon(successCallback, errorCallback, iconName)](#selligentsetnotificationlargeiconsuccesscallback-errorcallback-iconname)
549
- * [setNotificationLargeIcon example](#setnotificationlargeicon-example)
550
- * [Selligent.getGCMToken(successCallback)](#selligentgetgcmtokensuccesscallback)
551
- * [getGCMToken Example](#getgcmtoken-example)
552
- * [Selligent.getRemoteMessagesDisplayType(successCallback, errorCallback)](#selligentgetremotemessagesdisplaytypesuccesscallback-errorcallback)
553
- * [getRemoteMessagesDisplayType Example](#getremotemessagesdisplaytype-example)
554
- * [Selligent.setFirebaseToken(successCallback, errorCallback, token)](#selligentsetfirebasetokensuccesscallback--errorcallback--token)
555
- * [setFirebaseToken Example](#setFirebaseToken-example)
556
-
557
- * [iOS Only/Specific Methods](#ios-onlyspecific-methods)
558
- * [Selligent.enableiOSLogging(successCallback, errorCallback, logLevels)](#selligentenableiosloggingsuccesscallback-errorcallback-loglevels)
559
- * [enableiOSLogging example](#enableioslogging-example)
560
- * [Selligent.currentAuthorisationStatus(successCallback)](#selligentcurrentauthorisationstatussuccesscallback)
561
- * [currentAuthorisationStatus Example](#currentauthorisationstatus-example)
562
- * [Selligent.requestLocationAuthorisation(successCallback, errorCallback, iOSLocationAuthorisationType)](#selligentrequestlocationauthorisationsuccesscallback-errorcallback-ioslocationauthorisationtype)
563
- * [requestLocationAuthorisation Example](#requestlocationauthorisation-example)
564
- * [Selligent.displayNotification(successCallback, errorCallback, notificationId)](#selligentdisplaynotificationsuccesscallback-errorcallback-notificationid)
565
- * [displayNotification Example](#displaynotification-example)
566
- * [Selligent.registerRemoteNotificationFetchCompletionHandler(successCallback, errorCallback)](#selligentregisterremotenotificationfetchcompletionhandlersuccesscallback-errorcallback)
567
- * [registerRemoteNotificationFetchCompletionHandler example](#registerremotenotificationfetchcompletionhandler-example)
568
- * [Selligent.forceRemoteNotificationBackgroundFetchResult(successCallback, errorCallback, iOSBackgroundFetchResult)](#selligentforceremotenotificationbackgroundfetchresultsuccesscallback-errorcallback-iosbackgroundfetchresult)
569
- * [forceRemoteNotificationBackgroundFetchResult example](#forceremotenotificationbackgroundfetchresult-example)
570
-
571
- * [Constants](#constants)
572
- * [SelligentConstants.ClearCacheIntervalValue](#selligentconstantsclearcacheintervalvalue)
573
- * [SelligentConstants.InAppMessageRefreshType](#selligentconstantsinappmessagerefreshtype)
574
- * [SelligentConstants.AndroidRemoteMessagesDisplayType](#selligentconstantsandroidremotemessagesdisplaytype)
575
- * [SelligentConstants.iOSLogLevel](#selligentconstantsiosloglevel)
576
- * [SelligentConstants.iOSBackgroundFetchResult](#selligentconstantsiosbackgroundfetchresult)
577
- * [SelligentConstants.iOSLocationAuthorisationStatus](#selligentconstantsioslocationauthorisationstatus)
578
- * [SelligentConstants.iOSLocationAuthorisationType](#selligentconstantsioslocationauthorisationtype)
579
- * [SelligentConstants.EventType](#selligentconstantseventtype)
580
- * [SelligentConstants.iOSNotificationButtonType](#selligentconstantsiosnotificationbuttontype)
581
- * [SelligentConstants.BroadcastEventType](#selligentconstantsbroadcasteventtype)
532
+ - [Methods](#methods)
533
+
534
+ - [Selligent.getVersionLib(successCallback)](#selligentgetversionlibsuccesscallback)
535
+ - [getVersionLib example](#getversionlib-example)
536
+ - [Selligent.getDeviceId(successCallback)](#selligentgetdeviceidsuccesscallback)
537
+ - [getDeviceId example](#getdeviceid-example)
538
+ - [Selligent.enableNotifications(successCallback, errorCallback, enabled)](#selligentenablenotificationssuccesscallback-errorcallback-enabled)
539
+ - [enableNotifications example](#enablenotifications-example)
540
+ - [Selligent.displayLastReceivedRemotePushNotification(successCallback)](#selligentdisplaylastreceivedremotepushnotificationsuccesscallback)
541
+ - [displayLastReceivedRemotePushNotification example](#displaylastreceivedremotepushnotification-example)
542
+ - [Selligent.getLastRemotePushNotification(successCallback)](#selligentgetlastremotepushnotificationsuccesscallback)
543
+ - [getLastRemotePushNotification Example](#getlastremotepushnotification-example)
544
+ - [Selligent.enableInAppMessages(successCallback, errorCallback, enabled)](#selligentenableinappmessagessuccesscallback-errorcallback-enabled)
545
+ - [enableInAppMessages example](#enableinappmessages-example)
546
+ - [Selligent.getInAppMessages(successCallback)](#selligentgetinappmessagessuccesscallback)
547
+ - [getInAppMessages example](#getinappmessages-example)
548
+ - [Selligent.setInAppMessageAsSeen(successCallback, errorCallback, messageId)](#selligentsetinappmessageasseensuccesscallback-errorcallback-messageid)
549
+ - [setInAppMessageAsSeen example](#setinappmessageasseen-example)
550
+ - [Selligent.executeButtonAction(successCallback, errorCallback, buttonId, messageId)](#selligentexecutebuttonactionsuccesscallback-errorcallback-buttonid-messageid)
551
+ - [executeButtonAction example](#executeButtonAction-example)
552
+ - [Selligent.sendEvent(successCallback, errorCallback, event)](#selligentsendeventsuccesscallback-errorcallback-event)
553
+ - [sendEvent example](#sendevent-example)
554
+ - [Selligent.subscribeToEvents(successCallback, errorCallback, eventCallback)](#selligentsubscribetoeventssuccesscallback-errorcallback-eventcallback)
555
+ - [subscribeToEvents example](#subscribetoevents-example)
556
+
557
+ - [Android Only/Specific Methods](#android-onlyspecific-methods)
558
+
559
+ - [Selligent.subscribeToEvent(eventCallback, eventName)](#selligentsubscribetoeventeventcallback-eventname)
560
+ - [subscribeToEvent example](#subscribetoevent-example)
561
+ - [Selligent.areInAppMessagesEnabled(successCallback)](#selligentareinappmessagesenabledsuccesscallback)
562
+ - [areInAppMessagesEnabled example](#areinappmessagesenabled-example)
563
+ - [Selligent.enableAndroidLogging(successCallback, errorCallback, enabled)](#selligentenableandroidloggingsuccesscallback-errorcallback-enabled)
564
+ - [enableAndroidLogging example](#enableandroidlogging-example)
565
+ - [Selligent.displayMessage(successCallback, errorCallback, messageId)](#selligentdisplaymessagesuccesscallback-errorcallback-messageid)
566
+ - [displayMessage example](#displaymessage-example)
567
+ - [Selligent.areNotificationsEnabled(successCallback)](#selligentarenotificationsenabledsuccesscallback)
568
+ - [areNotificationsEnabled example](#arenotificationsenabled-example)
569
+ - [Selligent.setNotificationSmallIcon(successCallback, errorCallback, iconName)](#selligentsetnotificationsmalliconsuccesscallback-errorcallback-iconname)
570
+ - [setNotificationSmallIcon example](#setnotificationsmallicon-example)
571
+ - [Selligent.setNotificationLargeIcon(successCallback, errorCallback, iconName)](#selligentsetnotificationlargeiconsuccesscallback-errorcallback-iconname)
572
+ - [setNotificationLargeIcon example](#setnotificationlargeicon-example)
573
+ - [Selligent.setNotificationIconColor(successCallback, errorCallback, color)](#selligentsetnotificationiconcolorsuccesscallback-errorcallback-color)
574
+ - [setNotificationIconColor example](#setnotificationiconcolor-example)
575
+ - [Selligent.getGCMToken(successCallback)](#selligentgetgcmtokensuccesscallback)
576
+ - [getGCMToken Example](#getgcmtoken-example)
577
+ - [Selligent.getRemoteMessagesDisplayType(successCallback, errorCallback)](#selligentgetremotemessagesdisplaytypesuccesscallback-errorcallback)
578
+ - [getRemoteMessagesDisplayType Example](#getremotemessagesdisplaytype-example)
579
+ - [Selligent.setFirebaseToken(successCallback, errorCallback, token)](#selligentsetfirebasetokensuccesscallback--errorcallback--token)
580
+ - [setFirebaseToken Example](#setFirebaseToken-example)
581
+
582
+ - [iOS Only/Specific Methods](#ios-onlyspecific-methods)
583
+
584
+ - [Selligent.enableiOSLogging(successCallback, errorCallback, logLevels)](#selligentenableiosloggingsuccesscallback-errorcallback-loglevels)
585
+ - [enableiOSLogging example](#enableioslogging-example)
586
+ - [Selligent.displayNotification(successCallback, errorCallback, notificationId)](#selligentdisplaynotificationsuccesscallback-errorcallback-notificationid)
587
+ - [displayNotification Example](#displaynotification-example)
588
+ - [Selligent.registerForProvisionalRemoteNotification(successCallback)](#selligentregisterforprovisionalremotenotificationsuccesscallback)
589
+ - [registerForProvisionalRemoteNotification example](#registerForProvisionalRemoteNotification-example)
590
+ - [Selligent.registerRemoteNotificationFetchCompletionHandler(successCallback, errorCallback)](#selligentregisterremotenotificationfetchcompletionhandlersuccesscallback-errorcallback)
591
+ - [registerRemoteNotificationFetchCompletionHandler example](#registerremotenotificationfetchcompletionhandler-example)
592
+ - [Selligent.forceRemoteNotificationBackgroundFetchResult(successCallback, errorCallback, iOSBackgroundFetchResult)](#selligentforceremotenotificationbackgroundfetchresultsuccesscallback-errorcallback-iosbackgroundfetchresult)
593
+ - [forceRemoteNotificationBackgroundFetchResult example](#forceremotenotificationbackgroundfetchresult-example)
594
+
595
+ - [Constants](#constants)
596
+ - [SelligentConstants.ClearCacheIntervalValue](#selligentconstantsclearcacheintervalvalue)
597
+ - [SelligentConstants.InAppMessageType](#selligentconstantsinappmessagetype)
598
+ - [SelligentConstants.InAppMessageRefreshType](#selligentconstantsinappmessagerefreshtype)
599
+ - [SelligentConstants.RemoteMessagesDisplayType](#selligentconstantsremotemessagesdisplaytype)
600
+ - [SelligentConstants.iOSLogLevel](#selligentconstantsiosloglevel)
601
+ - [SelligentConstants.iOSBackgroundFetchResult](#selligentconstantsiosbackgroundfetchresult)
602
+ - [SelligentConstants.EventType](#selligentconstantseventtype)
603
+ - [SelligentConstants.iOSNotificationButtonType](#selligentconstantsiosnotificationbuttontype)
604
+ - [SelligentConstants.BroadcastEventType](#selligentconstantsbroadcasteventtype)
582
605
 
583
606
  ### Methods
584
607
 
@@ -591,56 +614,29 @@ The response of the success callback is a string containing the version of the S
591
614
  ##### getVersionLib example
592
615
 
593
616
  ```javascript
594
- Selligent.getVersionLib(
595
- (versionLib) => { // success callback
596
- alert(versionLib);
597
- }
598
- );
599
- ```
600
-
601
- <div align="right">
602
- <b><a href="#api-reference">back to API ToC</a></b>
603
- </div>
604
-
605
-
606
- #### Selligent.enableGeolocation(successCallback, errorCallback, enabled)
607
-
608
- Enable or disable geolocation services.
609
-
610
- The `enabled` parameter is a required boolean to enable or disable geolocation services.
611
-
612
- ##### enableGeolocation example
613
-
614
- ```javascript
615
- Selligent.enableGeolocation(
616
- (response) => { // success callback
617
- ...
618
- },
619
- (error) => { // error callback
620
- ...
621
- },
622
- true
623
- );
617
+ Selligent.getVersionLib((versionLib) => {
618
+ // success callback
619
+ alert(versionLib);
620
+ });
624
621
  ```
625
622
 
626
623
  <div align="right">
627
624
  <b><a href="#api-reference">back to API ToC</a></b>
628
625
  </div>
629
626
 
630
- #### Selligent.isGeolocationEnabled(successCallback)
627
+ #### Selligent.getDeviceId(successCallback)
631
628
 
632
- Check if geolocation services are enabled or disabled.
629
+ Returns the device id.
633
630
 
634
- The response of the success callback is a boolean stating geolocation services are enabled or disabled.
631
+ The response of the success callback is a string containing the device id.
635
632
 
636
- ##### isGeolocationEnabled example
633
+ ##### getDeviceId example
637
634
 
638
635
  ```javascript
639
- Selligent.isGeolocationEnabled(
640
- (response) => { // success callback
641
- ...
642
- }
643
- );
636
+ Selligent.getDeviceId((deviceId) => {
637
+ // success callback
638
+ alert(deviceId);
639
+ });
644
640
  ```
645
641
 
646
642
  <div align="right">
@@ -765,16 +761,17 @@ The response of the success callback is an array of objects which contain the in
765
761
 
766
762
  **Detailed overview:**
767
763
 
768
- | Property | Type | Description | Platform |
769
- | ------------------ | ------------------------------------------------------- | ----------------------------------------------------------------- | ------------ |
770
- | id | string | Id of the in app message | Both |
771
- | title | string | Title of the in app message | Both |
772
- | body | string | Body of the in app message | Both |
773
- | creationDate | number | Creation date of the in app message in unix time | Both |
774
- | expirationDate | number | Expiration date of the in app message in unix time | Both |
775
- | receptionDate | number | Reception date of the in app message in unix time | Both |
776
- | hasBeenSeen | boolean | Indication if the in app message is seen | Both |
777
- | buttons | array of objects | Contains the buttons that are linked to the in app message | Both |
764
+ | Property | Type | Description | Platform |
765
+ | -------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------------- | -------- |
766
+ | id | string | Id of the in app message | Both |
767
+ | title | string | Title of the in app message | Both |
768
+ | body | string | Body of the in app message | Both |
769
+ | type | enum [SelligentConstants.InAppMessageType](#selligentconstantsinappmessagetype) | Type of the in app message | Both |
770
+ | creationDate | number | Creation date of the in app message in unix time | Both |
771
+ | expirationDate | number | Expiration date of the in app message in unix time | Both |
772
+ | receptionDate | number | Reception date of the in app message in unix time | Both |
773
+ | hasBeenSeen | boolean | Indication if the in app message is seen | Both |
774
+ | buttons | array of objects | Contains the buttons that are linked to the in app message | Both |
778
775
 
779
776
  <br />
780
777
 
@@ -782,13 +779,13 @@ The `buttons` property is an array of button-objects which contain the informati
782
779
 
783
780
  <br />
784
781
 
785
- | Property | Type | Description | Platform |
786
- | ------------------ | ------------------------------------------------------- | ----------------------------------------------------------------- | ------------ |
787
- | id | string | Id of the button of the in app message | Both |
788
- | label | string | Label of the button of the in app message | Both |
789
- | value | string | Value of the button of the in app message | Both |
790
- | type | number | Type of the button of the in app message | Both |
791
- | action | number | Action of the button of the in app message | Android only |
782
+ | Property | Type | Description | Platform |
783
+ | -------- | ------ | ------------------------------------------ | ------------ |
784
+ | id | string | Id of the button of the in app message | Both |
785
+ | label | string | Label of the button of the in app message | Both |
786
+ | value | string | Value of the button of the in app message | Both |
787
+ | type | number | Type of the button of the in app message | Both |
788
+ | action | number | Action of the button of the in app message | Android only |
792
789
 
793
790
  <br />
794
791
 
@@ -871,12 +868,12 @@ The method accepts an `event` object which requires certain properties, dependin
871
868
  | data | object | Yes if event type is custom, optional if specific | Both | N/A |
872
869
  | shouldCache | boolean | No | iOS Only | true |
873
870
 
874
- The `type` property is used to define the event as *custom* or *specific* event, using the [EventType](#selligenteventtype) constants.
871
+ The `type` property is used to define the event as _custom_ or _specific_ event, using the [EventType](#selligenteventtype) constants.
875
872
 
876
873
  To define it as a custom event, one should use the `SelligentConstants.EventType.CUSTOM` constant. All other event types can be used to define the event as something specific.
877
874
 
878
- When an event is a *specific* event type, the `event` object requires an `email` property containing a string, and has an optional property `data` which is an object that can contain other information.
879
- When an event is a *custom* event type, the `event` object requires a `data` property containing an object which contains other information, and ignores the `email` property.
875
+ When an event is a _specific_ event type, the `event` object requires an `email` property containing a string, and has an optional property `data` which is an object that can contain other information.
876
+ When an event is a _custom_ event type, the `event` object requires a `data` property containing an object which contains other information, and ignores the `email` property.
880
877
 
881
878
  **iOS specific:**
882
879
 
@@ -970,6 +967,12 @@ And the detailed overview for items in the `messages` array is as such:
970
967
  | id | string | Id of a message |
971
968
  | title | string | Title of a message |
972
969
 
970
+ In case of a broadcast event type _ReceivedDeviceId_ the detailed overview for the `data` is as such:
971
+
972
+ | Property | Type | Description |
973
+ | -------- | ------ | ------------- |
974
+ | deviceId | string | The device id |
975
+
973
976
  In case of a broadcast event type _ReceivedGCMToken_ the detailed overview for the `data` is as such:
974
977
 
975
978
  | Property | Type | Description |
@@ -983,7 +986,7 @@ In case of a broadcast event type _ReceivedRemoteNotification_ the detailed over
983
986
  | pushId | string | The id of the remote push notification |
984
987
  | name | string | The name attached to the push notification |
985
988
 
986
- In case of a broadcast event type _WillDisplayNotification_ or _WillDismissNotification_ the `data` prop is `null`.
989
+ In case of a broadcast event type _WillDisplayNotification_ or _WillDismissNotification_ the `data` prop is `null`.
987
990
 
988
991
  **Android specific:**
989
992
 
@@ -1125,6 +1128,7 @@ Selligent.areNotificationsEnabled(
1125
1128
  Set the small icon of a notification on Android.
1126
1129
 
1127
1130
  The method accepts an `iconName` parameter which is a string containing the name of the small icon. When the application is closed it will default back to the icons specified in `selligent.json`.
1131
+
1128
1132
  > _Note: only parse the name of the icon, without the path. The icon should reside in the res/drawable folder of the Android project, as explained in [Android's official guide](https://developer.android.com/guide/topics/resources/drawable-resource#BitmapFile)._
1129
1133
 
1130
1134
  ##### setNotificationSmallIcon example
@@ -1150,6 +1154,7 @@ Selligent.setNotificationSmallIcon(
1150
1154
  Set the large icon of a notification on Android.
1151
1155
 
1152
1156
  The method accepts an `iconName` parameter which is a string containing the name of the large icon. When the application is closed it will default back to the icons specified in `selligent.json`.
1157
+
1153
1158
  > _Note: only parse the name of the icon, without the path. The icon should reside in the res/drawable folder of the Android project, as explained in [Android's official guide](https://developer.android.com/guide/topics/resources/drawable-resource#BitmapFile)._
1154
1159
 
1155
1160
  ##### setNotificationLargeIcon example
@@ -1170,6 +1175,32 @@ Selligent.setNotificationLargeIcon(
1170
1175
  <b><a href="#api-reference">back to API ToC</a></b>
1171
1176
  </div>
1172
1177
 
1178
+ #### Selligent.setNotificationIconColor(successCallback, errorCallback, color)
1179
+
1180
+ Set the icon color of a notification on Android.
1181
+
1182
+ The method accepts a `color` parameter which is a string containing the hex value of color.
1183
+
1184
+ > _The notification color can also be set by setting the notificationIconColor parameter in `selligent.json` to the hex color value_
1185
+
1186
+ ##### setNotificationIconColor example
1187
+
1188
+ ```javascript
1189
+ Selligent.setNotificationIconColor(
1190
+ (response) => { // success callback
1191
+ ...
1192
+ },
1193
+ (error) => { // error callback
1194
+ ...
1195
+ },
1196
+ "#00b8fb"
1197
+ );
1198
+ ```
1199
+
1200
+ <div align="right">
1201
+ <b><a href="#api-reference">back to API ToC</a></b>
1202
+ </div>
1203
+
1173
1204
  #### Selligent.getGCMToken(successCallback)
1174
1205
 
1175
1206
  Get the GCM token being used.
@@ -1272,44 +1303,21 @@ Selligent.enableiOSLogging(
1272
1303
  <b><a href="#api-reference">back to API ToC</a></b>
1273
1304
  </div>
1274
1305
 
1275
- #### Selligent.currentAuthorisationStatus(successCallback)
1276
-
1277
- Get the current status of location authorisation.
1278
-
1279
- The response of the success callback is a number corresponding with a constant of the [Selligent.iOSLocationAuthorisationStatus](#selligentioslocationauthorisationstatus) enum.
1280
-
1281
- ##### currentAuthorisationStatus Example
1282
-
1283
- ```javascript
1284
- Selligent.currentAuthorisationStatus(
1285
- (response) => { // success callback
1286
- ...
1287
- }
1288
- );
1289
- ```
1290
-
1291
- <div align="right">
1292
- <b><a href="#api-reference">back to API ToC</a></b>
1293
- </div>
1294
-
1295
- #### Selligent.requestLocationAuthorisation(successCallback, errorCallback, iOSLocationAuthorisationType)
1296
-
1297
- Request an authorisation of using location on a device.
1306
+ #### Selligent.displayNotification(successCallback, errorCallback, notificationId)
1298
1307
 
1299
- The method accepts an iOSLocationAuthorisationType parameter to define the type of authorisation which should be requested as there are two possibilities: "in use" and "always".
1300
- You can use constants of the [Selligent.iOSLocationAuthorisationType](#selligentioslocationauthorisationtype) enum to specify the authorisation request.
1308
+ Display a notification based on its id, which is a string that needs to be parsed in the method with the `notificationId` parameter.
1301
1309
 
1302
- ##### requestLocationAuthorisation Example
1310
+ ##### displayNotification Example
1303
1311
 
1304
1312
  ```javascript
1305
- Selligent.requestLocationAuthorisation(
1313
+ Selligent.displayNotification(
1306
1314
  (response) => { // success callback
1307
1315
  ...
1308
1316
  },
1309
1317
  (error) => { // error callback
1310
1318
  ...
1311
1319
  },
1312
- Selligent.iOSLocationAuthorisationType.IN_USE
1320
+ "some notification id"
1313
1321
  );
1314
1322
  ```
1315
1323
 
@@ -1317,21 +1325,17 @@ Selligent.requestLocationAuthorisation(
1317
1325
  <b><a href="#api-reference">back to API ToC</a></b>
1318
1326
  </div>
1319
1327
 
1320
- #### Selligent.displayNotification(successCallback, errorCallback, notificationId)
1328
+ #### Selligent.registerForProvisionalRemoteNotification(successCallback)
1321
1329
 
1322
- Display a notification based on its id, which is a string that needs to be parsed in the method with the `notificationId` parameter.
1330
+ You can decide to first ask for the Provisional push authorization (which will provide a valid push token but will not show any prompt to the user) if you want to contact users that did not decide about the Push permission yet (you can call `enableNotifications` later and it will still display the push permission prompt to the user).
1323
1331
 
1324
- ##### displayNotification Example
1332
+ ##### registerForProvisionalRemoteNotification example
1325
1333
 
1326
1334
  ```javascript
1327
- Selligent.displayNotification(
1328
- (response) => { // success callback
1329
- ...
1330
- },
1331
- (error) => { // error callback
1332
- ...
1333
- },
1334
- "some notification id"
1335
+ Selligent.registerForProvisionalRemoteNotification(
1336
+ () => { // success callback
1337
+ ...
1338
+ }
1335
1339
  );
1336
1340
  ```
1337
1341
 
@@ -1405,6 +1409,25 @@ _Note: `ClearCacheIntervalValue.Android.DAY` is only used on Android and can not
1405
1409
  <b><a href="#api-reference">back to API ToC</a></b>
1406
1410
  </div>
1407
1411
 
1412
+ #### SelligentConstants.InAppMessageType
1413
+
1414
+ Defines the type of the in-app messages.
1415
+
1416
+ | Name | Type | Value | Description |
1417
+ | -------- | ------ | ----- | ------------------------------- |
1418
+ | UNKNOWN | number | -2 | In App message of unknown type |
1419
+ | HIDDEN | number | -1 | In App message of hidden type |
1420
+ | ALERT | number | 0 | In App message of alert type |
1421
+ | HTML | number | 1 | In App message of html type |
1422
+ | URL | number | 2 | In App message of url type |
1423
+ | IMAGE | number | 3 | In App message of image type |
1424
+ | MAP | number | 4 | In App message of map type |
1425
+ | PASSBOOK | number | 5 | In App message of passbook type |
1426
+
1427
+ <div align="right">
1428
+ <b><a href="#api-reference">back to API ToC</a></b>
1429
+ </div>
1430
+
1408
1431
  #### SelligentConstants.InAppMessageRefreshType
1409
1432
 
1410
1433
  Defines how often the SDK must retrieve the in-app messages.
@@ -1422,7 +1445,7 @@ _Note: `InAppMessageRefreshType.Android.MINUTE` is only used on Android and can
1422
1445
  <b><a href="#api-reference">back to API ToC</a></b>
1423
1446
  </div>
1424
1447
 
1425
- #### SelligentConstants.AndroidRemoteMessagesDisplayType
1448
+ #### SelligentConstants.RemoteMessagesDisplayType
1426
1449
 
1427
1450
  Defines if and how remote messages can be displayed on Android.
1428
1451
 
@@ -1468,34 +1491,6 @@ Description of the possible results of a background fetch on iOS.
1468
1491
  <b><a href="#api-reference">back to API ToC</a></b>
1469
1492
  </div>
1470
1493
 
1471
- #### SelligentConstants.iOSLocationAuthorisationStatus
1472
-
1473
- Description of the possible status of use of location services on a device.
1474
-
1475
- | Name | Type | Value | Description |
1476
- | -------------- | ------ | ----- | ----------------------------------------------- |
1477
- | UNKNOWN | number | 70 | Status of use of location services is unknown |
1478
- | REFUSED | number | 71 | Use of location services is refused |
1479
- | GRANTED_IN_USE | number | 72 | Use of location services is granted when in use |
1480
- | GRANTED_ALWAYS | number | 72 | Use of location services is always granted |
1481
-
1482
- <div align="right">
1483
- <b><a href="#api-reference">back to API ToC</a></b>
1484
- </div>
1485
-
1486
- #### SelligentConstants.iOSLocationAuthorisationType
1487
-
1488
- Defines the level of request for the authorisation of usage of location services on a device.
1489
-
1490
- | Name | Type | Value | Description |
1491
- | ------ | ------ | ----- | --------------------------------------------------------- |
1492
- | IN_USE | number | 80 | Request authorisation when location services are in use |
1493
- | ALWAYS | number | 81 | Always request the authorisation of the location services |
1494
-
1495
- <div align="right">
1496
- <b><a href="#api-reference">back to API ToC</a></b>
1497
- </div>
1498
-
1499
1494
  #### SelligentConstants.EventType
1500
1495
 
1501
1496
  Defines the type of an event.
@@ -1545,6 +1540,7 @@ Defines the type of a broadcast event.
1545
1540
  | RECEIVED_IN_APP_MESSAGE | string | "ReceivedInAppMessage" | An in-app message has been received |
1546
1541
  | WILL_DISPLAY_NOTIFICATION | string | "WillDisplayNotification" | A notification will be displayed |
1547
1542
  | WILL_DISMISS_NOTIFICATION | string | "WillDismissNotification" | A notification will be dismissed |
1543
+ | RECEIVED_DEVICE_ID | string | "ReceivedDeviceId" | A device id has been received |
1548
1544
  | Android.RECEIVED_GCM_TOKEN | string | "ReceivedGCMToken" | A GCM token has been received (only on Android) |
1549
1545
  | iOS.RECEIVED_REMOTE_NOTIFICATION | string | "ReceivedRemoteNotification" | A remote notification has been received (only on iOS) |
1550
1546
 
@@ -1552,4 +1548,4 @@ _Notes: `BroadcastEventType.Android.RECEIVED_GCM_TOKEN` is only used on Android
1552
1548
 
1553
1549
  <div align="right">
1554
1550
  <b><a href="#api-reference">back to API ToC</a></b>
1555
- </div>
1551
+ </div>