@selligent-marketing-cloud/selligent-react-native 3.4.1 → 3.5.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 (29) hide show
  1. package/README.md +11 -48
  2. package/RNSelligentMapper.podspec +1 -1
  3. package/android/build.gradle +27 -16
  4. package/android/libs/RNSelligentMobileSDK.aar +0 -0
  5. package/android/src/main/AndroidManifest.xml +1 -1
  6. package/android/src/main/java/com/selligent/EventReceiver.java +1 -0
  7. package/android/src/main/java/com/selligent/RNSelligent.java +12 -0
  8. package/documentation/README.md +31 -32
  9. package/helpers.js +1 -1
  10. package/index.ios.js +1 -1
  11. package/index.js +10 -21
  12. package/package.json +10 -6
  13. package/android/src/main/java/com/selligent/BroadcastDataFactory.java +0 -47
  14. package/android/src/main/java/com/selligent/BroadcastEventDataParser.java +0 -9
  15. package/android/src/main/java/com/selligent/BroadcastEventType.java +0 -37
  16. package/android/src/main/java/com/selligent/ButtonAction.java +0 -82
  17. package/android/src/main/java/com/selligent/ButtonBroadcastEventDataParser.java +0 -50
  18. package/android/src/main/java/com/selligent/ClearCacheIntervalValue.java +0 -36
  19. package/android/src/main/java/com/selligent/DeviceIdBroadcastEventDataParser.java +0 -15
  20. package/android/src/main/java/com/selligent/Event.java +0 -51
  21. package/android/src/main/java/com/selligent/EventType.java +0 -27
  22. package/android/src/main/java/com/selligent/GCMTokenBroadcastEventDataParser.java +0 -24
  23. package/android/src/main/java/com/selligent/InAppMessageBroadcastEventDataParser.java +0 -43
  24. package/android/src/main/java/com/selligent/InAppMessageRefreshType.java +0 -34
  25. package/android/src/main/java/com/selligent/NotificationMessageBroadcastEventDataParser.java +0 -19
  26. package/android/src/main/java/com/selligent/RemoteMessageDisplayType.java +0 -50
  27. package/android/src/main/java/com/selligent/SMEventFactory.java +0 -37
  28. package/android/src/main/java/com/selligent/SMSettingsFactory.java +0 -38
  29. package/android/src/main/java/com/selligent/Settings.java +0 -160
@@ -1,82 +0,0 @@
1
- package com.selligent;
2
-
3
- import com.selligent.sdk.SMLinkAction;
4
-
5
- public enum ButtonAction
6
- {
7
- unknown(100),
8
- phone(101),
9
- sms(102),
10
- mail(103),
11
- url(104),
12
- externalApp(105),
13
- rateApp(106),
14
- broadcastEvent(107),
15
- passbook(111),
16
- deeplink(112),
17
- simple(113);
18
-
19
- private final int buttonAction;
20
-
21
- ButtonAction(int action) { this.buttonAction = action; }
22
-
23
- public static ButtonAction valueOf(int x)
24
- {
25
- switch(x) {
26
- case 101:
27
- return phone;
28
- case 102:
29
- return sms;
30
- case 103:
31
- return mail;
32
- case 104:
33
- return url;
34
- case 105:
35
- return externalApp;
36
- case 106:
37
- return rateApp;
38
- case 107:
39
- return broadcastEvent;
40
- case 111:
41
- return passbook;
42
- case 112:
43
- return deeplink;
44
- case 113:
45
- return simple;
46
- default:
47
- return unknown;
48
- }
49
- }
50
-
51
- public static ButtonAction valueOf(SMLinkAction linkAction)
52
- {
53
- switch(linkAction) {
54
- case phone:
55
- return phone;
56
- case sms:
57
- return sms;
58
- case mail:
59
- return mail;
60
- case url:
61
- return url;
62
- case externalApp:
63
- return externalApp;
64
- case rateApp:
65
- return rateApp;
66
- case broadcastEvent:
67
- return broadcastEvent;
68
- case passbook:
69
- return passbook;
70
- case deeplink:
71
- return deeplink;
72
- case simple:
73
- return simple;
74
- }
75
- return unknown;
76
- }
77
-
78
- public int getValue()
79
- {
80
- return buttonAction;
81
- }
82
- }
@@ -1,50 +0,0 @@
1
- package com.selligent;
2
-
3
- import android.content.Intent;
4
-
5
- import com.facebook.react.bridge.WritableMap;
6
- import com.facebook.react.bridge.WritableNativeMap;
7
- import com.selligent.sdk.SMManager;
8
- import com.selligent.sdk.SMNotificationButton;
9
-
10
- class ButtonBroadcastEventDataParser implements BroadcastEventDataParser {
11
- @Override
12
- public WritableMap parse(Intent intent) {
13
- SMNotificationButton button;
14
- if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.TIRAMISU)
15
- {
16
- button = intent.getSerializableExtra(SMManager.BROADCAST_DATA_BUTTON, SMNotificationButton.class);
17
- }
18
- else
19
- {
20
- button = (SMNotificationButton)intent.getSerializableExtra(SMManager.BROADCAST_DATA_BUTTON);
21
- }
22
-
23
- return wrap(button);
24
- }
25
-
26
- public WritableMap wrap(SMNotificationButton button)
27
- {
28
- final WritableMap resultingMap = new WritableNativeMap();
29
-
30
- resultingMap.putString("id", button.id);
31
- resultingMap.putInt("type", ButtonAction.valueOf(button.action).getValue());
32
- resultingMap.putString("value", button.value);
33
- resultingMap.putString("label", button.label);
34
-
35
- if (button.data != null) {
36
- final WritableMap buttonData = new WritableNativeMap();
37
- for(String dataKey : button.data.keySet()) {
38
- buttonData.putString(dataKey, button.data.get(dataKey));
39
- }
40
-
41
- if (!buttonData.toHashMap().isEmpty()) {
42
- resultingMap.putMap("data", buttonData);
43
- } else {
44
- resultingMap.putMap("data", null);
45
- }
46
- }
47
-
48
- return resultingMap;
49
- }
50
- }
@@ -1,36 +0,0 @@
1
- package com.selligent;
2
-
3
- import com.selligent.sdk.SMClearCache;
4
-
5
- enum ClearCacheIntervalValue {
6
- AUTO(1, SMClearCache.Auto),
7
- NONE(2, SMClearCache.None),
8
- DAY(3, SMClearCache.Day),
9
- WEEK(4, SMClearCache.Week),
10
- MONTH(5, SMClearCache.Month),
11
- QUARTER(6, SMClearCache.Quarter);
12
-
13
- private Integer index;
14
- private SMClearCache smClearCache;
15
-
16
- ClearCacheIntervalValue(Integer index, SMClearCache smClearCache) {
17
- this.index = index;
18
- this.smClearCache = smClearCache;
19
- }
20
-
21
- public SMClearCache getSmClearCache() {
22
- return smClearCache;
23
- }
24
-
25
- public static ClearCacheIntervalValue valueOf(Integer index) {
26
- ClearCacheIntervalValue result = null;
27
- for(ClearCacheIntervalValue clearCacheIntervalValue : values()) {
28
- if(index.equals(clearCacheIntervalValue.index)) {
29
- result = clearCacheIntervalValue;
30
- }
31
- }
32
-
33
- if(result == null) throw new IllegalArgumentException("Invalid clearCacheIntervalValue");
34
- return result;
35
- }
36
- }
@@ -1,15 +0,0 @@
1
- package com.selligent;
2
-
3
- import com.facebook.react.bridge.WritableMap;
4
- import com.facebook.react.bridge.WritableNativeMap;
5
-
6
- class DeviceIdBroadcastEventDataParser {
7
-
8
- public WritableMap wrap(String deviceId) {
9
- final WritableMap resultingMap = new WritableNativeMap();
10
-
11
- resultingMap.putString("deviceId", deviceId);
12
-
13
- return resultingMap;
14
- }
15
- }
@@ -1,51 +0,0 @@
1
- package com.selligent;
2
-
3
- import java.util.HashMap;
4
- import java.util.Hashtable;
5
- import java.util.Map;
6
-
7
- class Event {
8
-
9
- private EventType type;
10
- private String email;
11
- private Hashtable<String, String> data;
12
-
13
- private Event() { }
14
-
15
- public EventType getType() {
16
- return type;
17
- }
18
-
19
- public String getEmail() {
20
- return email;
21
- }
22
-
23
- public Hashtable<String, String> getData() {
24
- return data;
25
- }
26
-
27
- static Event fromHashMap(HashMap<String, Object> eventHashMap) {
28
- final Integer typeIndex = ((Double) eventHashMap.get("type")).intValue();
29
- final EventType type = EventType.valueOf(typeIndex);
30
- String email = null;
31
- if (eventHashMap.containsKey("email")) {
32
- email = (String) eventHashMap.get("email");
33
- }
34
-
35
- Hashtable<String, String> data = null;
36
- if (eventHashMap.containsKey("data")) {
37
- final HashMap<String, String> dataHashMap = (HashMap<String, String>) eventHashMap.get("data");
38
- data = new Hashtable<>();
39
- for (Map.Entry<String, String> entry : dataHashMap.entrySet()) {
40
- data.put(entry.getKey(), entry.getValue());
41
- }
42
- }
43
-
44
- final Event event = new Event();
45
- event.type = type;
46
- event.email = email;
47
- event.data = data;
48
- return event;
49
- }
50
-
51
- }
@@ -1,27 +0,0 @@
1
- package com.selligent;
2
-
3
- enum EventType {
4
- UserRegister(90),
5
- UserUnregister(91),
6
- UserLogin(92),
7
- UserLogout(93),
8
- Custom(94);
9
-
10
- private int index;
11
-
12
- EventType(Integer index) {
13
- this.index = index;
14
- }
15
-
16
- public static EventType valueOf(Integer index) {
17
- EventType result = null;
18
- for (EventType eventType: values()) {
19
- if(index.equals(eventType.index)) {
20
- result = eventType;
21
- }
22
- }
23
-
24
- if (result == null) throw new IllegalArgumentException("Invalid eventType");
25
- return result;
26
- }
27
- }
@@ -1,24 +0,0 @@
1
- package com.selligent;
2
-
3
- import android.content.Intent;
4
-
5
- import com.facebook.react.bridge.WritableMap;
6
- import com.facebook.react.bridge.WritableNativeMap;
7
- import com.selligent.sdk.SMManager;
8
-
9
- class GCMTokenBroadcastEventDataParser implements BroadcastEventDataParser {
10
- @Override
11
- public WritableMap parse(Intent intent) {
12
- final String token = intent.getStringExtra(SMManager.BROADCAST_DATA_GCM_TOKEN);
13
-
14
- return wrap(token);
15
- }
16
-
17
- public WritableMap wrap(String token) {
18
- final WritableMap resultingMap = new WritableNativeMap();
19
-
20
- resultingMap.putString("token", token);
21
-
22
- return resultingMap;
23
- }
24
- }
@@ -1,43 +0,0 @@
1
- package com.selligent;
2
-
3
- import android.content.Intent;
4
-
5
- import com.facebook.react.bridge.WritableArray;
6
- import com.facebook.react.bridge.WritableMap;
7
- import com.facebook.react.bridge.WritableNativeArray;
8
- import com.facebook.react.bridge.WritableNativeMap;
9
- import com.selligent.sdk.SMInAppMessage;
10
- import com.selligent.sdk.SMManager;
11
-
12
- class InAppMessageBroadcastEventDataParser implements BroadcastEventDataParser {
13
- @Override
14
- public WritableMap parse(Intent intent) {
15
- SMInAppMessage[] messages;
16
- if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.TIRAMISU)
17
- {
18
- messages = intent.getSerializableExtra(SMManager.BROADCAST_DATA_IN_APP_MESSAGES, SMInAppMessage[].class);
19
- }
20
- else
21
- {
22
- messages = (SMInAppMessage[])intent.getSerializableExtra(SMManager.BROADCAST_DATA_IN_APP_MESSAGES);
23
- }
24
-
25
- return wrap(messages);
26
- }
27
-
28
- public WritableMap wrap(SMInAppMessage[] messages)
29
- {
30
- final WritableMap resultingMap = new WritableNativeMap();
31
-
32
- final WritableArray messageArray = new WritableNativeArray();
33
- for (SMInAppMessage message : messages) {
34
- WritableMap messageMap = new WritableNativeMap();
35
- messageMap.putString("id", message.id);
36
- messageMap.putString("title", message.title);
37
- messageArray.pushMap(messageMap);
38
- }
39
- resultingMap.putArray("messages", messageArray);
40
-
41
- return resultingMap;
42
- }
43
- }
@@ -1,34 +0,0 @@
1
- package com.selligent;
2
-
3
- import com.selligent.sdk.SMInAppRefreshType;
4
-
5
- enum InAppMessageRefreshType {
6
- NONE(10, SMInAppRefreshType.None),
7
- MINUTELY(11, SMInAppRefreshType.Minutely),
8
- HOURLY(12, SMInAppRefreshType.Hourly),
9
- DAILY(13, SMInAppRefreshType.Daily);
10
-
11
- private Integer index;
12
- private SMInAppRefreshType smInAppRefreshType;
13
-
14
- InAppMessageRefreshType(Integer index, SMInAppRefreshType smInAppRefreshType) {
15
- this.index = index;
16
- this.smInAppRefreshType = smInAppRefreshType;
17
- }
18
-
19
- public SMInAppRefreshType getSmInAppRefreshType() {
20
- return smInAppRefreshType;
21
- }
22
-
23
- public static InAppMessageRefreshType valueOf(Integer index) {
24
- InAppMessageRefreshType result = null;
25
- for (InAppMessageRefreshType inAppMessageRefreshType: values()) {
26
- if(index.equals(inAppMessageRefreshType.index)) {
27
- result = inAppMessageRefreshType;
28
- }
29
- }
30
-
31
- if (result == null) throw new IllegalArgumentException("Invalid inAppMessageRefreshType");
32
- return result;
33
- }
34
- }
@@ -1,19 +0,0 @@
1
- package com.selligent;
2
-
3
- import com.facebook.react.bridge.WritableMap;
4
- import com.facebook.react.bridge.WritableNativeMap;
5
- import com.selligent.sdk.SMNotificationMessage;
6
-
7
- class NotificationMessageBroadcastEventDataParser
8
- {
9
- public WritableMap wrap(SMNotificationMessage message)
10
- {
11
- final WritableMap resultingMap = new WritableNativeMap();
12
-
13
- resultingMap.putString("pushId", message.getId());
14
- resultingMap.putString("name", message.getNotificationTitle());
15
-
16
-
17
- return resultingMap;
18
- }
19
- }
@@ -1,50 +0,0 @@
1
- package com.selligent;
2
-
3
- import com.selligent.sdk.SMRemoteMessageDisplayType;
4
-
5
- enum RemoteMessageDisplayType {
6
- AUTOMATIC(20, SMRemoteMessageDisplayType.Automatic),
7
- NONE(21, SMRemoteMessageDisplayType.None),
8
- NOTIFICATION(22, SMRemoteMessageDisplayType.Notification);
9
-
10
- private Integer index;
11
- private SMRemoteMessageDisplayType smRemoteMessageDisplayType;
12
-
13
- RemoteMessageDisplayType(Integer index, SMRemoteMessageDisplayType smRemoteMessageDisplayType) {
14
- this.index = index;
15
- this.smRemoteMessageDisplayType = smRemoteMessageDisplayType;
16
- }
17
-
18
- public Integer getIndex() {
19
- return index;
20
- }
21
-
22
- public SMRemoteMessageDisplayType getSmRemoteMessageDisplayType() {
23
- return smRemoteMessageDisplayType;
24
- }
25
-
26
- public static RemoteMessageDisplayType valueOf(Integer index) {
27
- RemoteMessageDisplayType result = null;
28
- for (RemoteMessageDisplayType remoteMessageDisplayType : values()) {
29
- if(index.equals(remoteMessageDisplayType.index)) {
30
- result = remoteMessageDisplayType;
31
- }
32
- }
33
-
34
- if (result == null) throw new IllegalArgumentException("Invalid remoteMessageDisplayType");
35
- return result;
36
- }
37
-
38
- public static RemoteMessageDisplayType valueOf(SMRemoteMessageDisplayType smRemoteMessageDisplayType) {
39
- RemoteMessageDisplayType result = null;
40
- for (RemoteMessageDisplayType remoteMessageDisplayType : values()) {
41
- if(smRemoteMessageDisplayType == remoteMessageDisplayType.smRemoteMessageDisplayType) {
42
- result = remoteMessageDisplayType;
43
- }
44
- }
45
-
46
- if (result == null) throw new IllegalArgumentException("Invalid SMRemoteMessageDisplayType");
47
- return result;
48
- }
49
-
50
- }
@@ -1,37 +0,0 @@
1
- package com.selligent;
2
-
3
- import com.selligent.sdk.SMCallback;
4
- import com.selligent.sdk.SMEvent;
5
- import com.selligent.sdk.SMEventUserLogin;
6
- import com.selligent.sdk.SMEventUserLogout;
7
- import com.selligent.sdk.SMEventUserRegister;
8
- import com.selligent.sdk.SMEventUserUnregister;
9
-
10
-
11
- import java.util.Hashtable;
12
-
13
- class SMEventFactory {
14
- private SMEventFactory(){}
15
-
16
- public static SMEvent getSMEvent(Event event, SMCallback callback) {
17
- final EventType type = event.getType();
18
- final String email = event.getEmail();
19
- final Hashtable<String, String> data = event.getData();
20
-
21
- switch (type) {
22
- case UserRegister:
23
- return new SMEventUserRegister(email, data, callback);
24
- case UserUnregister:
25
- return new SMEventUserUnregister(email, data, callback);
26
- case UserLogin:
27
- return new SMEventUserLogin(email, data, callback);
28
- case UserLogout:
29
- return new SMEventUserLogout(email, data, callback);
30
- case Custom:
31
- return new SMEvent(null, data, callback);
32
- default:
33
- throw new IllegalArgumentException("SMManager sendEvent failed: you provided an invalid EventType");
34
- }
35
- }
36
-
37
- }
@@ -1,38 +0,0 @@
1
- package com.selligent;
2
-
3
- import com.selligent.sdk.SMSettings;
4
- import com.selligent.sdk.SMFrameworkType;
5
-
6
- class SMSettingsFactory {
7
- private SMSettingsFactory(){}
8
-
9
- public static SMSettings getSMSettings(Settings settings) {
10
- final SMSettings smSettings = new SMSettings();
11
- smSettings.WebServiceUrl = settings.getUrl();
12
- smSettings.ClientId = settings.getClientId();
13
- smSettings.PrivateKey = settings.getPrivateKey();
14
- smSettings.AddInAppMessageFromPushToInAppMessageList = settings.getAddInAppMessageFromPushToInAppMessageList();
15
- smSettings.DoNotFetchTheToken = settings.getDoNotFetchTheToken();
16
- smSettings.DoNotListenToThePush = settings.getDoNotListenToThePush();
17
- smSettings.LoadCacheAsynchronously = settings.getLoadCacheAsynchronously();
18
- smSettings.NotificationChannelId = settings.getNotificationChannelId();
19
- smSettings.NotificationChannelName = settings.getNotificationChannelName();
20
- smSettings.NotificationChannelDescription = settings.getNotificationChannelDescription();
21
- smSettings.FrameworkType = SMFrameworkType.reactNative;
22
-
23
- final ClearCacheIntervalValue clearCacheIntervalValue = settings.getClearCacheIntervalValue();
24
- if (clearCacheIntervalValue != null) {
25
- smSettings.ClearCacheIntervalValue = clearCacheIntervalValue.getSmClearCache();
26
- }
27
- final InAppMessageRefreshType inAppMessageRefreshType = settings.getInAppMessageRefreshType();
28
- if (inAppMessageRefreshType != null) {
29
- smSettings.InAppMessageRefreshType = inAppMessageRefreshType.getSmInAppRefreshType();
30
- }
31
- final RemoteMessageDisplayType remoteMessageDisplayType = settings.getRemoteMessageDisplayType();
32
- if (remoteMessageDisplayType != null) {
33
- smSettings.RemoteMessageDisplayType = remoteMessageDisplayType.getSmRemoteMessageDisplayType();
34
- }
35
- return smSettings;
36
- }
37
-
38
- }
@@ -1,160 +0,0 @@
1
- package com.selligent;
2
-
3
-
4
- import java.util.Map;
5
-
6
- class Settings {
7
-
8
- private String url;
9
- private String clientId;
10
- private String privateKey;
11
- private String activityName;
12
- private String notificationSmallIcon;
13
- private String notificationLargeIcon;
14
- private String notificationIconColor;
15
- private boolean addInAppMessageFromPushToInAppMessageList = false;
16
- private Boolean doNotFetchTheToken = false;
17
- private Boolean doNotListenToThePush = false;
18
- private Boolean loadCacheAsynchronously = false;
19
- private ClearCacheIntervalValue clearCacheIntervalValue;
20
- private InAppMessageRefreshType inAppMessageRefreshType = InAppMessageRefreshType.NONE;
21
- private RemoteMessageDisplayType remoteMessageDisplayType;
22
- private String notificationChannelId = "SMChannel001";
23
- private String notificationChannelName = "SMDefaultChannel";
24
- private String notificationChannelDescription = "";
25
- private Boolean enableAndroidLogging = false;
26
-
27
- private Settings() { }
28
-
29
- public String getUrl() {
30
- return url;
31
- }
32
-
33
- public String getClientId() {
34
- return clientId;
35
- }
36
-
37
- public String getPrivateKey() {
38
- return privateKey;
39
- }
40
-
41
- public String getActivityName() {
42
- return activityName;
43
- }
44
-
45
- public String getNotificationSmallIcon() {
46
- return notificationSmallIcon;
47
- }
48
-
49
- public String getNotificationLargeIcon() {
50
- return notificationLargeIcon;
51
- }
52
-
53
- public String getNotificationIconColor() {
54
- return notificationIconColor;
55
- }
56
-
57
- public Boolean getDoNotListenToThePush() { return doNotListenToThePush; }
58
-
59
- public Boolean getAddInAppMessageFromPushToInAppMessageList() { return addInAppMessageFromPushToInAppMessageList; }
60
-
61
- public Boolean getDoNotFetchTheToken() { return doNotFetchTheToken; }
62
-
63
- public Boolean getLoadCacheAsynchronously() { return loadCacheAsynchronously; }
64
-
65
- public ClearCacheIntervalValue getClearCacheIntervalValue() {
66
- return clearCacheIntervalValue;
67
- }
68
-
69
- public InAppMessageRefreshType getInAppMessageRefreshType() {
70
- return inAppMessageRefreshType;
71
- }
72
-
73
- public RemoteMessageDisplayType getRemoteMessageDisplayType() {
74
- return remoteMessageDisplayType;
75
- }
76
-
77
- public String getNotificationChannelId() {
78
- return notificationChannelId;
79
- }
80
-
81
- public String getNotificationChannelName() {
82
- return notificationChannelName;
83
- }
84
-
85
- public String getNotificationChannelDescription() {
86
- return notificationChannelDescription;
87
- }
88
-
89
- public Boolean getEnableAndroidLogging() { return enableAndroidLogging; }
90
-
91
- public static Settings fromHashMap(Map<String, Object> settingsHashMap) {
92
- final Settings settings = new Settings();
93
-
94
- settings.url = (String) settingsHashMap.get("url");
95
- settings.clientId = (String) settingsHashMap.get("clientId");
96
- settings.privateKey = (String) settingsHashMap.get("privateKey");
97
- settings.activityName = (String) settingsHashMap.get("fullyQualifiedNotificationActivityClassName");
98
-
99
- if (settingsHashMap.containsKey("notificationSmallIcon")) {
100
- settings.notificationSmallIcon = (String) settingsHashMap.get("notificationSmallIcon");
101
- }
102
-
103
- if (settingsHashMap.containsKey("notificationLargeIcon")) {
104
- settings.notificationLargeIcon = (String) settingsHashMap.get("notificationLargeIcon");
105
- }
106
-
107
- if (settingsHashMap.containsKey("notificationIconColor")) {
108
- settings.notificationIconColor = (String) settingsHashMap.get("notificationIconColor");
109
- }
110
-
111
- if (settingsHashMap.containsKey("addInAppMessageFromPushToInAppMessageList")) {
112
- settings.addInAppMessageFromPushToInAppMessageList = (Boolean) settingsHashMap.get("addInAppMessageFromPushToInAppMessageList");
113
- }
114
-
115
- if (settingsHashMap.containsKey("doNotFetchTheToken")) {
116
- settings.doNotFetchTheToken = (Boolean) settingsHashMap.get("doNotFetchTheToken");
117
- }
118
-
119
- if (settingsHashMap.containsKey("doNotListenToThePush")) {
120
- settings.doNotListenToThePush = (Boolean) settingsHashMap.get("doNotListenToThePush");
121
- }
122
-
123
- if (settingsHashMap.containsKey("loadCacheAsynchronously")) {
124
- settings.loadCacheAsynchronously = (Boolean) settingsHashMap.get("loadCacheAsynchronously");
125
- }
126
-
127
- if (settingsHashMap.containsKey("notificationChannelId")) {
128
- settings.notificationChannelId = (String) settingsHashMap.get("notificationChannelId");
129
- }
130
-
131
- if (settingsHashMap.containsKey("notificationChannelName")) {
132
- settings.notificationChannelName = (String) settingsHashMap.get("notificationChannelName");
133
- }
134
-
135
- if (settingsHashMap.containsKey("notificationChannelDescription")) {
136
- settings.notificationChannelDescription = (String) settingsHashMap.get("notificationChannelDescription");
137
- }
138
-
139
- if (settingsHashMap.containsKey("enableAndroidLogging")) {
140
- settings.enableAndroidLogging = (Boolean) settingsHashMap.get("enableAndroidLogging");
141
- }
142
-
143
- final Double clearCacheIndex = (Double) settingsHashMap.get("clearCacheIntervalValue");
144
- if (clearCacheIndex != null) {
145
- settings.clearCacheIntervalValue = ClearCacheIntervalValue.valueOf(clearCacheIndex.intValue());
146
- }
147
-
148
- final Double inAppMsgRefreshIndex = (Double) settingsHashMap.get("inAppMessageRefreshType");
149
- if (inAppMsgRefreshIndex != null) {
150
- settings.inAppMessageRefreshType = InAppMessageRefreshType.valueOf(inAppMsgRefreshIndex.intValue());
151
- }
152
-
153
- final Double remoteMsgRefreshIndex = (Double) settingsHashMap.get("remoteMessageDisplayType");
154
- if (remoteMsgRefreshIndex != null) {
155
- settings.remoteMessageDisplayType = RemoteMessageDisplayType.valueOf(remoteMsgRefreshIndex.intValue());
156
- }
157
-
158
- return settings;
159
- }
160
- }