react-native-acoustic-connect-beta 16.0.11 → 16.0.13
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.
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"react": "18.2.0",
|
|
16
16
|
"react-dom": "18.2.0",
|
|
17
17
|
"react-native": "0.72.10",
|
|
18
|
-
"react-native-acoustic-connect-beta": "16.0.
|
|
18
|
+
"react-native-acoustic-connect-beta": "16.0.13",
|
|
19
19
|
"react-native-gesture-handler": "~2.12.0",
|
|
20
20
|
"react-native-keyboard-aware-scroll-view": "^0.9.5",
|
|
21
21
|
"react-native-reanimated": "~3.3.0",
|
|
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|
|
2
2
|
import { NavigationContainer } from '@react-navigation/native';
|
|
3
3
|
import { Box, useColorModeValue, useToken } from 'native-base';
|
|
4
4
|
import { RootStack } from '../../src/navigators/rootNavigator';
|
|
5
|
-
|
|
5
|
+
import { Connect, ConnectProfiler } from 'react-native-acoustic-connect-beta';
|
|
6
6
|
import { useRef } from 'react';
|
|
7
7
|
|
|
8
8
|
export const Root = () => {
|
|
@@ -14,7 +14,7 @@ export const Root = () => {
|
|
|
14
14
|
);
|
|
15
15
|
const bgColor = useColorModeValue(lightBg, darkBg);
|
|
16
16
|
return (
|
|
17
|
-
|
|
17
|
+
<Connect>
|
|
18
18
|
<NavigationContainer
|
|
19
19
|
ref={navigationRef}
|
|
20
20
|
theme={{
|
|
@@ -37,6 +37,6 @@ export const Root = () => {
|
|
|
37
37
|
<RootStack />
|
|
38
38
|
</Box>
|
|
39
39
|
</NavigationContainer>
|
|
40
|
-
|
|
40
|
+
</Connect>
|
|
41
41
|
);
|
|
42
42
|
};
|
|
@@ -13,7 +13,6 @@ package com.tl.uic.rncxa;
|
|
|
13
13
|
import android.app.Activity;
|
|
14
14
|
import android.app.Application;
|
|
15
15
|
import android.content.Context;
|
|
16
|
-
import android.inputmethodservice.KeyboardView;
|
|
17
16
|
import android.text.TextUtils;
|
|
18
17
|
import android.view.View;
|
|
19
18
|
import android.view.inputmethod.InputMethodManager;
|
|
@@ -32,6 +31,7 @@ import com.facebook.react.uimanager.UIManagerModule;
|
|
|
32
31
|
import com.ibm.eo.EOCore;
|
|
33
32
|
import com.ibm.eo.model.EOMonitoringLevel;
|
|
34
33
|
import com.acoustic.connect.android.connectmod.Connect;
|
|
34
|
+
import com.tl.uic.Tealeaf;
|
|
35
35
|
import com.tl.uic.model.ScreenviewType;
|
|
36
36
|
import com.tl.uic.util.LayoutUtil;
|
|
37
37
|
|
|
@@ -74,16 +74,18 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
|
|
|
74
74
|
updateResult(result, promise);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
// TODO fix
|
|
78
77
|
/**
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* @param
|
|
78
|
+
* Sets the module's boolean configuration item from AdvancedConfig.json or BasicConfig.properties that matches the specified key.
|
|
79
|
+
*
|
|
80
|
+
* @param key Map Key.
|
|
81
|
+
* @param value Boolean Value.
|
|
82
|
+
* @param moduleName The class name of the module's EOLifecycleObject for which the configuration item is referencing.
|
|
83
|
+
* @param promise Javascript Promise interface.
|
|
82
84
|
*/
|
|
83
85
|
@ReactMethod
|
|
84
|
-
public void
|
|
85
|
-
|
|
86
|
-
updateResult(
|
|
86
|
+
public void setBooleanConfigItemForKey(final String key, final Boolean value, final String moduleName, final Promise promise) {
|
|
87
|
+
boolean result = EOCore.updateConfig(key, value.toString(), EOCore.getLifecycleObject(moduleName));
|
|
88
|
+
updateResult(result, promise);
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
/**
|
|
@@ -99,6 +101,20 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
|
|
|
99
101
|
updateResult(result, promise);
|
|
100
102
|
}
|
|
101
103
|
|
|
104
|
+
/**
|
|
105
|
+
* Sets the module's string configuration item from AdvancedConfig.json or BasicConfig.properties that matches the specified key.
|
|
106
|
+
*
|
|
107
|
+
* @param key Map Key.
|
|
108
|
+
* @param value String Value.
|
|
109
|
+
* @param moduleName The class name of the module's EOLifecycleObject for which the configuration item is referencing.
|
|
110
|
+
* @param promise Javascript Promise interface.
|
|
111
|
+
*/
|
|
112
|
+
@ReactMethod
|
|
113
|
+
public void setStringItemForKey(final String key, final String value, final String moduleName, final Promise promise) {
|
|
114
|
+
boolean result = EOCore.updateConfig(key, value.toString(), EOCore.getLifecycleObject(moduleName));
|
|
115
|
+
updateResult(result, promise);
|
|
116
|
+
}
|
|
117
|
+
|
|
102
118
|
/**
|
|
103
119
|
* Gets the module's configuration item from AdvancedConfig.json or BasicConfig.properties that matches the specified key.
|
|
104
120
|
*
|
|
@@ -116,6 +132,20 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
|
|
|
116
132
|
updateResult(result, promise);
|
|
117
133
|
}
|
|
118
134
|
|
|
135
|
+
/**
|
|
136
|
+
* Sets the module's number configuration item from AdvancedConfig.json or BasicConfig.properties that matches the specified key.
|
|
137
|
+
*
|
|
138
|
+
* @param key Map Key.
|
|
139
|
+
* @param value Number Value.
|
|
140
|
+
* @param moduleName The class name of the module's EOLifecycleObject for which the configuration item is referencing.
|
|
141
|
+
* @param promise Javascript Promise interface.
|
|
142
|
+
*/
|
|
143
|
+
@ReactMethod
|
|
144
|
+
public void setNumberItemForKey(final String key, final Double value, final String moduleName, final Promise promise) {
|
|
145
|
+
boolean result = EOCore.updateConfig(key, value.toString(), EOCore.getLifecycleObject(moduleName));
|
|
146
|
+
updateResult(result, promise);
|
|
147
|
+
}
|
|
148
|
+
|
|
119
149
|
/**
|
|
120
150
|
* Gets the module's configuration item from AdvancedConfig.json or BasicConfig.properties that matches the specified key.
|
|
121
151
|
*
|
|
@@ -126,8 +156,7 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
|
|
|
126
156
|
*/
|
|
127
157
|
@ReactMethod
|
|
128
158
|
public void getNumberItemForKey(final int theDefault, final String key, final String moduleName, final Promise promise) {
|
|
129
|
-
|
|
130
|
-
int result = EOCore.getConfigItemInt(key, EOCore.getLifecycleObject(moduleName));
|
|
159
|
+
Double result = EOCore.getConfigItemDouble(key, EOCore.getLifecycleObject(moduleName));
|
|
131
160
|
updateResult(result, promise);
|
|
132
161
|
}
|
|
133
162
|
|
|
@@ -157,7 +186,7 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
|
|
|
157
186
|
public void logCustomEvent(final String eventName, final ReadableMap readableMap, final int logLevel, final Promise promise) {
|
|
158
187
|
HashMap<String, String> map = new HashMap<>();
|
|
159
188
|
|
|
160
|
-
|
|
189
|
+
// Convert to conform with React-Native MAP type
|
|
161
190
|
for (Map.Entry<String, Object> entry : readableMap.toHashMap().entrySet()) {
|
|
162
191
|
map.put(entry.getKey(), entry.getValue().toString());
|
|
163
192
|
}
|
|
@@ -223,7 +252,7 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
|
|
|
223
252
|
* @param promise Javascript Promise interface.
|
|
224
253
|
*/
|
|
225
254
|
@ReactMethod
|
|
226
|
-
public void
|
|
255
|
+
public void logLocationWithLatitudeLongitude(final double lat, final double lng, final int logLevel, final Promise promise) {
|
|
227
256
|
final boolean result = Connect.INSTANCE.logLocationUpdateEventWithLatitude(lat, lng, logLevel);
|
|
228
257
|
updateResult(result, promise);
|
|
229
258
|
}
|
|
@@ -240,8 +269,7 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
|
|
|
240
269
|
if (hasFocus) {
|
|
241
270
|
InputMethodManager imm = (InputMethodManager) v.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
|
242
271
|
imm.showSoftInput(v, InputMethodManager.SHOW_FORCED);
|
|
243
|
-
|
|
244
|
-
KeyboardView keyboardView = new KeyboardView(v.getContext().getApplicationContext(), null);
|
|
272
|
+
com.tl.uic.util.keyboardview.KeyboardView keyboardView = new com.tl.uic.util.keyboardview.KeyboardView(v.getContext().getApplicationContext(), null);
|
|
245
273
|
|
|
246
274
|
if (TextUtils.isEmpty(accessibilityID)) {
|
|
247
275
|
Connect.INSTANCE.logEvent(keyboardView, Connect.TLF_UI_KEYBOARD_DID_SHOW_NOTIFICATION);
|
|
@@ -255,7 +283,7 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
|
|
|
255
283
|
InputMethodManager imm = (InputMethodManager) v.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
|
256
284
|
imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
|
|
257
285
|
|
|
258
|
-
KeyboardView keyboardView = new KeyboardView(v.getContext().getApplicationContext(), null);
|
|
286
|
+
com.tl.uic.util.keyboardview.KeyboardView keyboardView = new com.tl.uic.util.keyboardview.KeyboardView(v.getContext().getApplicationContext(), null);
|
|
259
287
|
|
|
260
288
|
if (TextUtils.isEmpty(accessibilityID)) {
|
|
261
289
|
Connect.INSTANCE.logEvent(keyboardView, Connect.TLF_UI_KEYBOARD_DID_HIDE_NOTIFICATION);
|
|
@@ -372,6 +400,18 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
|
|
|
372
400
|
}
|
|
373
401
|
}
|
|
374
402
|
|
|
403
|
+
/**
|
|
404
|
+
* Log ScreenView Page event.
|
|
405
|
+
*
|
|
406
|
+
* @param logicalPageName Page name or title e.g. "Login View Controller"; Must not be empty.
|
|
407
|
+
* @param promise Javascript Promise interface.
|
|
408
|
+
*/
|
|
409
|
+
@ReactMethod
|
|
410
|
+
public void logScreenViewPageName(final String logicalPageName, final Promise promise) {
|
|
411
|
+
final boolean result = Connect.INSTANCE.logScreenview(Objects.requireNonNull(getCurrentActivity()), logicalPageName, ScreenviewType.LOAD);
|
|
412
|
+
updateResult(result, promise);
|
|
413
|
+
}
|
|
414
|
+
|
|
375
415
|
/**
|
|
376
416
|
* Requests that the framework logs an screen load event.
|
|
377
417
|
*
|
|
@@ -460,7 +500,8 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
|
|
|
460
500
|
*/
|
|
461
501
|
@Override
|
|
462
502
|
public void onHostDestroy() {
|
|
463
|
-
//
|
|
503
|
+
// TODO fix
|
|
504
|
+
Tealeaf.onDestroy(getCurrentActivity(), null);
|
|
464
505
|
// Connect.INSTANCE.onDestroy(getCurrentActivity(), null);
|
|
465
506
|
}
|
|
466
507
|
}
|
package/package.json
CHANGED