react-native-acoustic-connect-beta 16.0.6 → 16.0.7

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 (31) hide show
  1. package/Example/nativebase-v3-kitchensink/android/app/build.gradle +1 -1
  2. package/Example/nativebase-v3-kitchensink/android/app/src/main/java/com/geekyants/kitchensinkappnativebase/generated/BasePackageList.java +21 -0
  3. package/Example/nativebase-v3-kitchensink/android/build.gradle +4 -4
  4. package/Example/nativebase-v3-kitchensink/android/settings.gradle +1 -4
  5. package/Example/nativebase-v3-kitchensink/ios/build/XCBuildData/a6b76eb483287825e3d8acec0a94d196.xcbuilddata/build-request.json +27 -0
  6. package/Example/nativebase-v3-kitchensink/ios/build/XCBuildData/a6b76eb483287825e3d8acec0a94d196.xcbuilddata/description.msgpack +0 -0
  7. package/Example/nativebase-v3-kitchensink/ios/build/XCBuildData/a6b76eb483287825e3d8acec0a94d196.xcbuilddata/manifest.json +1 -0
  8. package/Example/nativebase-v3-kitchensink/ios/build/XCBuildData/a6b76eb483287825e3d8acec0a94d196.xcbuilddata/target-graph.txt +1 -0
  9. package/Example/nativebase-v3-kitchensink/ios/build/XCBuildData/a6b76eb483287825e3d8acec0a94d196.xcbuilddata/task-store.msgpack +0 -0
  10. package/Example/nativebase-v3-kitchensink/ios/build/XCBuildData/c0fec93a979a5e37e3134ca391db148a.xcbuilddata/build-request.json +27 -0
  11. package/Example/nativebase-v3-kitchensink/ios/build/XCBuildData/c0fec93a979a5e37e3134ca391db148a.xcbuilddata/description.msgpack +0 -0
  12. package/Example/nativebase-v3-kitchensink/ios/build/XCBuildData/c0fec93a979a5e37e3134ca391db148a.xcbuilddata/manifest.json +1 -0
  13. package/Example/nativebase-v3-kitchensink/ios/build/XCBuildData/c0fec93a979a5e37e3134ca391db148a.xcbuilddata/target-graph.txt +1 -0
  14. package/Example/nativebase-v3-kitchensink/ios/build/XCBuildData/c0fec93a979a5e37e3134ca391db148a.xcbuilddata/task-store.msgpack +0 -0
  15. package/Example/nativebase-v3-kitchensink/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm +2008 -0
  16. package/Example/nativebase-v3-kitchensink/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h +2448 -0
  17. package/Example/nativebase-v3-kitchensink/ios/build/generated/ios/FBReactNativeSpecJSI-generated.cpp +1523 -0
  18. package/Example/nativebase-v3-kitchensink/ios/build/generated/ios/FBReactNativeSpecJSI.h +5509 -0
  19. package/Example/nativebase-v3-kitchensink/ios/build/generated/ios/React-Codegen.podspec.json +1 -0
  20. package/android/build.gradle +1 -1
  21. package/android/config.gradle +4 -4
  22. package/android/src/main/assets/ConnectAdvancedConfig.json +3 -0
  23. package/android/src/main/assets/TealeafBasicConfig.properties +26 -68
  24. package/android/src/main/assets/TealeafLayoutConfig.json +1 -26
  25. package/android/src/main/java/com/tl/uic/rncxa/RNCxaModule.java +127 -100
  26. package/android/src/main/java/com/tl/uic/rncxa/RNCxaPackage.java +7 -3
  27. package/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm +0 -0
  28. package/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h +0 -0
  29. package/ios/build/generated/ios/React-Codegen.podspec.json +1 -0
  30. package/latestChanges +0 -1
  31. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"name":"React-Codegen","version":"0.72.10","summary":"Temp pod for generated files for React Native","homepage":"https://facebook.com/","license":"Unlicense","authors":"Facebook","compiler_flags":"-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32 -Wno-documentation -Wno-nullability-completeness -std=c++17","source":{"git":""},"header_mappings_dir":"./","platforms":{"ios":"12.4"},"source_files":"**/*.{h,mm,cpp}","pod_target_xcconfig":{"HEADER_SEARCH_PATHS":"\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\" \"$(PODS_ROOT)/Headers/Private/React-Fabric\" \"$(PODS_ROOT)/Headers/Private/React-RCTFabric\"","FRAMEWORK_SEARCH_PATHS":[]},"dependencies":{"React-jsiexecutor":[],"RCT-Folly":[],"RCTRequired":[],"RCTTypeSafety":[],"React-Core":[],"React-jsi":[],"ReactCommon/turbomodule/bridging":[],"ReactCommon/turbomodule/core":[],"React-NativeModulesApple":[],"glog":[],"DoubleConversion":[],"hermes-engine":[],"React-rncore":[],"FBReactNativeSpec":[]}}
@@ -14,7 +14,7 @@ buildscript {
14
14
  }
15
15
 
16
16
  android {
17
- compileSdkVersion 31
17
+ compileSdkVersion 33
18
18
  buildToolsVersion '32.0.0'
19
19
 
20
20
  defaultConfig {
@@ -18,7 +18,7 @@ println("Executing config.gradle")
18
18
 
19
19
  def writeConfig(json) {
20
20
  def module_path = project(':react-native-acoustic-connect-beta').projectDir.getPath()
21
- def propertiesFile = "$module_path/src/main/assets/ConnectBasicConfig.properties"
21
+ def propertiesFile = "$module_path/src/main/assets/TealeafBasicConfig.properties"
22
22
 
23
23
  println("Writing config to file $propertiesFile")
24
24
 
@@ -30,7 +30,7 @@ def writeConfig(json) {
30
30
  FileOutputStream out = new FileOutputStream(propertiesFile);
31
31
 
32
32
  json.each { key, value ->
33
- if(key != "Connect"){ return }
33
+ if(key != "Tealeaf"){ return }
34
34
 
35
35
  value.each { config_key, config_value ->
36
36
  if(config_value.getClass() != java.lang.String
@@ -58,8 +58,8 @@ def getConfigJSON() {
58
58
  def overrideLayoutConfig(){
59
59
  def configFilePath = "$project.rootDir/../ConnectConfig.json"
60
60
  def module_path = project(':react-native-acoustic-connect-beta').projectDir.getPath()
61
- def layoutConfigPath = "$module_path/src/main/assets/ConnectLayoutConfig.json"
62
- def layoutConfigDefaultPath = "$module_path/src/main/assets/ConnectLayoutConfigDefault.json"
61
+ def layoutConfigPath = "$module_path/src/main/assets/TealeafLayoutConfig.json"
62
+ def layoutConfigDefaultPath = "$module_path/src/main/assets/TealeafLayoutConfigDefault.json"
63
63
 
64
64
  def configFile = new File(configFilePath)
65
65
 
@@ -0,0 +1,3 @@
1
+ {
2
+ "LibraryVersion": "10.4.21"
3
+ }
@@ -1,77 +1,35 @@
1
- #--------------------------------------------------------------------------------------------
2
- # Copyright (C) 2024 Acoustic, L.P. All rights reserved.
3
- #
4
- # NOTICE: This file contains material that is confidential and proprietary to
5
- # Acoustic, L.P. and/or other developers. No license is granted under any intellectual or
6
- # industrial property rights of Acoustic, L.P. except as may be provided in an agreement with
7
- # Acoustic, L.P. Any unauthorized copying or distribution of content from this file is
8
- # prohibited.
9
- #--------------------------------------------------------------------------------------------
10
-
11
- #Kill switch settings
12
- KillSwitchEnabled=true
13
- #if KillSwitchEnabled=true, then fill the section of the settings below
14
- KillSwitchUrl=https://lib-us-2.brilliantcollector.com/collector/switch/fa47722a7fef4bcd8677fd8d6d113a0d
15
-
16
- #Post settings
17
- PostMessageUrl=https://lib-us-2.brilliantcollector.com/collector/collectorPost
18
- #Saas Integration
1
+ #Thu Nov 07 20:00:11 PST 2024
19
2
  AppKey=fa47722a7fef4bcd8677fd8d6d113a0d
20
-
21
- #Should have at least 1
22
- KillSwitchMaxNumberOfTries=3
23
- #The time to wait before checking the kill switch URL if it is not responding
24
- KillSwitchTimeInterval=5
25
- UseWhiteList=true
26
- WhiteListParam=id
27
- UseRandomSample=false
28
- RandomSampleParam=
29
-
30
- PrintScreen=3
3
+ CaptureNativeGesturesOnWebview=false
31
4
  Connection=3
32
- MaxStringsLength=300
33
-
34
- #Sessionization settings
35
- CookieUrl=http://m.straussandplesser.com
36
- CookieParam=TLTSID
37
- CookiePath=/
38
5
  CookieDomain=.straussandplesser.com
39
- #Whether you want to add an expires property on the cookie which will be offset + SessionTimeout value
40
- #When post is sent, expiration of cookie will be current time + session timeout
41
6
  CookieExpires=false
42
- #Whether you want to create a secure cookie which can only be sent using a https url in PostMessageUrl.
43
- CookieSecure=false
44
- #Valid date formats: ASCTIME, RFC1036, RFC1123
45
7
  CookieExpiresFormat=ASCTIME
46
- #Session timeout is in minutes, set to 0 if session timeout is not needed and depend on cookie instead
47
- SessionTimeout=30
48
- #Call killswitch for a new session id
49
- SessionTimeoutKillSwitch=false
50
-
51
- #Image settings
52
- # You can have PNG or JPG
53
- ScreenshotFormat=JPG
54
- # Percentage of screen capture's original pixel dimensions at which posted screen captures are submitted from 1 to 100.
8
+ CookieParam=TLTSID
9
+ CookiePath=/
10
+ CookieSecure=false
11
+ CookieUrl=http\://m.straussandplesser.com
12
+ DisableAutoInstrumentation=true
13
+ GetImageDataOnScreenLayout=false
14
+ KillSwitchEnabled=true
15
+ KillSwitchMaxNumberOfTries=3
16
+ KillSwitchTimeInterval=5
17
+ KillSwitchUrl=https\://lib-us-2.brilliantcollector.com/collector/switch/fa47722a7fef4bcd8677fd8d6d113a0d
18
+ LogLocationEnabled=true
19
+ LogLocationTimeout=30
20
+ LogLocationTries=3
21
+ LogViewLayoutOnScreenTransition=true
22
+ MaxStringsLength=300
55
23
  PercentOfScreenshotsSize=40
56
- # Percentage to compress image which can only be done for jpg images. PNG will ignore and default to 100.
57
24
  PercentToCompressImage=80
58
- # Pixel density of a device when screenshot is taken. 0 is an invalid value for this configuration setting. 1, 1.5, 2, 3 etc are valid values.
25
+ PostMessageUrl=https\://lib-us-2.brilliantcollector.com/collector/collectorPost
26
+ PrintScreen=3
27
+ RandomSampleParam=
59
28
  ScreenShotPixelDensity=1.5
60
-
61
- #Capture native layout
62
- LogViewLayoutOnScreenTransition=true
63
- # Current only done on ImageView
64
- GetImageDataOnScreenLayout=false
65
-
66
- #Gesture enabled or not
29
+ ScreenshotFormat=JPG
30
+ SessionTimeout=30
31
+ SessionTimeoutKillSwitch=false
67
32
  SetGestureDetector=true
68
- CaptureNativeGesturesOnWebview=false
69
-
70
- #Auto Geolocation logging enabled or not
71
- LogLocationEnabled=true
72
- LogLocationTries=3
73
- LogLocationTimeout=30
74
-
75
- #Auto Instrumentation
76
- # You need to have TeaCuts.jar installed and set below to false to enable
77
- DisableAutoInstrumentation=true
33
+ UseRandomSample=false
34
+ UseWhiteList=true
35
+ WhiteListParam=id
@@ -1,26 +1 @@
1
- {
2
- "AutoLayout": {
3
- "GlobalScreenSettings":{
4
- "ScreenChange": true,
5
- "DisplayName": "MainActivity",
6
- "CaptureLayoutDelay": 500,
7
- "ScreenShot": true,
8
- "NumberOfWebViews": 0,
9
- "CaptureUserEvents": true,
10
- "CaptureScreenVisits": false,
11
- "CaptureLayoutOn": 0,
12
- "CaptureScreenshotOn": 0
13
- }
14
- },
15
- "AppendMapIds": {
16
- "[w,9290],[v,0]": {
17
- "mid": "ASimpleUIView"
18
- },
19
- "tag2999999": {
20
- "mid": "giveAdditionalId1"
21
- },
22
- "idxPathValue": {
23
- "mid": "giveAdditionalId2"
24
- }
25
- }
26
- }
1
+ {"AutoLayout":{"GlobalScreenSettings":{"ScreenChange":true,"DisplayName":"Example","CaptureLayoutDelay":500,"ScreenShot":true,"NumberOfWebViews":0,"CaptureUserEvents":true,"CaptureScreenVisits":false,"CaptureLayoutOn":2,"CaptureScreenshotOn":2,"Masking":{"HasMasking":true,"HasCustomMask":true,"Sensitive":{"capitalCaseAlphabet":"X","number":"9","smallCaseAlphabet":"x","symbol":"#"},"MaskIdList":[],"MaskValueList":[]}}},"MainActivity":{"ScreenChange":true,"DisplayName":"LoginActivity","CaptureLayoutOn":2,"Masking":{"HasMasking":true,"HasCustomMask":true,"Sensitive":{"capitalCaseAlphabet":"X","number":"9","smallCaseAlphabet":"x","symbol":"#"},"MaskIdList":["password"],"MaskValueList":[],"MaskAccessibilityIdList":[],"MaskAccessibilityLabelList":["Masking","Test Masking","password"]}},"Button":{"ScreenChange":true,"DisplayName":"Visible","CaptureLayoutDelay":500,"ScreenShot":true,"NumberOfWebViews":0,"CaptureUserEvents":true,"CaptureScreenVisits":true,"CaptureLayoutOn":2,"CaptureScreenshotOn":2},"ErrorTest":{"ScreenChange":false,"DisplayName":"Hidden","CaptureLayoutDelay":1,"ScreenShot":false,"NumberOfWebViews":0,"CaptureUserEvents":false,"CaptureScreenVisits":false,"CaptureLayoutOn":0,"CaptureScreenshotOn":0},"AppendMapIds":{"[w,9290],[v,0]":{"mid":"ASimpleUIView"},"tag2999999":{"mid":"giveAdditionalId1"},"idxPathValue":{"mid":"giveAdditionalId2"}}}
@@ -8,7 +8,6 @@
8
8
  // prohibited.
9
9
  //
10
10
 
11
-
12
11
  package com.tl.uic.rncxa;
13
12
 
14
13
  import android.app.Activity;
@@ -21,23 +20,24 @@ import android.view.inputmethod.InputMethodManager;
21
20
  import android.widget.EditText;
22
21
  import android.widget.TextView;
23
22
 
23
+ import androidx.annotation.NonNull;
24
+
24
25
  import com.facebook.react.bridge.LifecycleEventListener;
25
26
  import com.facebook.react.bridge.Promise;
26
27
  import com.facebook.react.bridge.ReactApplicationContext;
27
28
  import com.facebook.react.bridge.ReactContextBaseJavaModule;
28
29
  import com.facebook.react.bridge.ReactMethod;
29
30
  import com.facebook.react.bridge.ReadableMap;
30
- import com.facebook.react.uimanager.NativeViewHierarchyManager;
31
- import com.facebook.react.uimanager.UIBlock;
32
31
  import com.facebook.react.uimanager.UIManagerModule;
33
32
  import com.ibm.eo.EOCore;
34
33
  import com.ibm.eo.model.EOMonitoringLevel;
35
- import com.tl.uic.Connect;
34
+ import com.acoustic.connect.android.connectmod.Connect;
36
35
  import com.tl.uic.model.ScreenviewType;
37
36
  import com.tl.uic.util.LayoutUtil;
38
37
 
39
38
  import java.util.HashMap;
40
39
  import java.util.Map;
40
+ import java.util.Objects;
41
41
 
42
42
 
43
43
  /**
@@ -56,6 +56,7 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
56
56
  this.reactContext.addLifecycleEventListener(this);
57
57
  }
58
58
 
59
+ @NonNull
59
60
  @Override
60
61
  public String getName() {
61
62
  return "RNCxa";
@@ -69,10 +70,11 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
69
70
  */
70
71
  @ReactMethod
71
72
  public void setCurrentScreenName(final String logicalPageName, final Promise promise) {
72
- boolean result = Connect.resumeConnect(getCurrentActivity(), logicalPageName, false);
73
+ boolean result = Connect.INSTANCE.resumeConnect(getCurrentActivity(), logicalPageName, false);
73
74
  updateResult(result, promise);
74
75
  }
75
76
 
77
+ // TODO fix
76
78
  /**
77
79
  * @param readableMap
78
80
  * @param moduleName
@@ -160,7 +162,7 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
160
162
  map.put(entry.getKey(), entry.getValue().toString());
161
163
  }
162
164
 
163
- final boolean result = Connect.logCustomEvent(eventName, map, logLevel);
165
+ final boolean result = Connect.INSTANCE.logCustomEvent(eventName, map, logLevel);
164
166
  updateResult(result, promise);
165
167
  }
166
168
 
@@ -174,7 +176,7 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
174
176
  */
175
177
  @ReactMethod
176
178
  public void logExceptionEvent(final String message, final String stackInfo, final Boolean unhandled, final Promise promise) {
177
- final boolean result = Connect.logExceptionEvent("React Plugin", message, stackInfo, unhandled);
179
+ final boolean result = Connect.INSTANCE.logExceptionEvent("React Plugin", message, stackInfo, unhandled);
178
180
  updateResult(result, promise);
179
181
  }
180
182
 
@@ -187,27 +189,25 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
187
189
  */
188
190
  @ReactMethod
189
191
  public void logScreenLayout(final String logicalPageName, final int delay, final Promise promise) {
190
- /**
191
- * Init current page, check before loglayout.
192
- */
193
- Connect.setCurrentLogicalPageName(logicalPageName);
194
- Connect.logScreenview(getCurrentActivity(), logicalPageName, ScreenviewType.LOAD);
192
+ // Init current page, check before loglayout.
193
+ Connect.INSTANCE.setCurrentLogicalPageName(logicalPageName);
194
+ Connect.INSTANCE.logScreenview(getCurrentActivity(), logicalPageName, ScreenviewType.LOAD);
195
195
  if (LayoutUtil.canCaptureUserEvents(null, logicalPageName)) {
196
- final boolean result = Connect.logScreenLayout(getCurrentActivity(), logicalPageName, delay < 0 ? 300 : delay, true);
196
+ final boolean result = Connect.INSTANCE.logScreenLayout(Objects.requireNonNull(getCurrentActivity()), logicalPageName, delay < 0 ? 300 : delay, true);
197
197
  updateResult(result, promise);
198
198
  }
199
199
  updateResult(true, promise);
200
200
  }
201
201
 
202
202
  /**
203
- * Log GeoLocation. Below permission is need in the androidmanifest.xml file.
203
+ * Log GeoLocation. Below permission is need in the AndroidManifest.xml file.
204
204
  * <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
205
205
  *
206
- * @param promise
206
+ * @param promise Promise used to get result.
207
207
  */
208
208
  @ReactMethod
209
209
  public void logLocation(final Promise promise) {
210
- final boolean result = Connect.logGeolocation(EOMonitoringLevel.kEOMonitoringLevelInfo.getValue());
210
+ final boolean result = Connect.INSTANCE.logGeolocation(EOMonitoringLevel.kEOMonitoringLevelInfo.getValue());
211
211
  updateResult(result, promise);
212
212
  }
213
213
 
@@ -224,60 +224,57 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
224
224
  */
225
225
  @ReactMethod
226
226
  public void logLocationUpdateWithLatitude(final double lat, final double lng, final int logLevel, final Promise promise) {
227
- final boolean result = Connect.logLocationUpdateEventWithLatitude(lat, lng, logLevel);
227
+ final boolean result = Connect.INSTANCE.logLocationUpdateEventWithLatitude(lat, lng, logLevel);
228
228
  updateResult(result, promise);
229
229
  }
230
230
 
231
231
  /**
232
232
  * Add focus listener to handle EditText UI control.
233
233
  *
234
- * @param textView Input TextView.
235
- * @param accessibilityID Assessibility ID(virtual id).
236
- * @param activity Current activity.
234
+ * @param textView Input TextView.
235
+ * @param accessibilityID Accessibility ID(virtual id).
236
+ * @param activity Current activity.
237
237
  */
238
238
  public void addFocusAndRegister(final TextView textView, final String accessibilityID, final Activity activity) {
239
- textView.setOnFocusChangeListener(new View.OnFocusChangeListener() {
240
- @Override
241
- public void onFocusChange(View v, boolean hasFocus) {
242
- if (hasFocus) {
243
- InputMethodManager imm = (InputMethodManager) v.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
244
- imm.showSoftInput(v, InputMethodManager.SHOW_FORCED);
245
-
246
- KeyboardView keyboardView = new KeyboardView(v.getContext().getApplicationContext(), null);
247
-
248
- if (TextUtils.isEmpty(accessibilityID)) {
249
- Connect.logEvent(keyboardView, Connect.TLF_UI_KEYBOARD_DID_SHOW_NOTIFICATION);
250
- Connect.logEvent(v, Connect.TLF_ON_FOCUS_CHANGE_IN);
251
- } else {
252
- Connect.logEvent(keyboardView, Connect.TLF_UI_KEYBOARD_DID_SHOW_NOTIFICATION, accessibilityID);
253
- Connect.logEvent(v, Connect.TLF_ON_FOCUS_CHANGE_IN, accessibilityID);
254
- }
239
+ textView.setOnFocusChangeListener((v, hasFocus) -> {
240
+ if (hasFocus) {
241
+ InputMethodManager imm = (InputMethodManager) v.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
242
+ imm.showSoftInput(v, InputMethodManager.SHOW_FORCED);
243
+ // TODO update class
244
+ KeyboardView keyboardView = new KeyboardView(v.getContext().getApplicationContext(), null);
245
+
246
+ if (TextUtils.isEmpty(accessibilityID)) {
247
+ Connect.INSTANCE.logEvent(keyboardView, Connect.TLF_UI_KEYBOARD_DID_SHOW_NOTIFICATION);
248
+ Connect.INSTANCE.logEvent(v, Connect.TLF_ON_FOCUS_CHANGE_IN);
255
249
  } else {
256
- com.tl.uic.Connect.logEvent(v, com.tl.uic.Connect.TLF_ON_FOCUS_CHANGE_OUT);
257
- InputMethodManager imm = (InputMethodManager) v.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
258
- imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
250
+ Connect.INSTANCE.logEvent(keyboardView, Connect.TLF_UI_KEYBOARD_DID_SHOW_NOTIFICATION, accessibilityID);
251
+ Connect.INSTANCE.logEvent(v, Connect.TLF_ON_FOCUS_CHANGE_IN, accessibilityID);
252
+ }
253
+ } else {
254
+ Connect.INSTANCE.logEvent(v, Connect.TLF_ON_FOCUS_CHANGE_OUT);
255
+ InputMethodManager imm = (InputMethodManager) v.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
256
+ imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
259
257
 
260
- KeyboardView keyboardView = new KeyboardView(v.getContext().getApplicationContext(), null);
258
+ KeyboardView keyboardView = new KeyboardView(v.getContext().getApplicationContext(), null);
261
259
 
262
- if (TextUtils.isEmpty(accessibilityID)) {
263
- Connect.logEvent(keyboardView, Connect.TLF_UI_KEYBOARD_DID_HIDE_NOTIFICATION);
264
- } else {
265
- Connect.logEvent(keyboardView, Connect.TLF_UI_KEYBOARD_DID_HIDE_NOTIFICATION, accessibilityID);
266
- }
260
+ if (TextUtils.isEmpty(accessibilityID)) {
261
+ Connect.INSTANCE.logEvent(keyboardView, Connect.TLF_UI_KEYBOARD_DID_HIDE_NOTIFICATION);
262
+ } else {
263
+ Connect.INSTANCE.logEvent(keyboardView, Connect.TLF_UI_KEYBOARD_DID_HIDE_NOTIFICATION, accessibilityID);
267
264
  }
268
265
  }
269
266
  });
270
267
 
271
- Connect.registerFormField(textView, activity);
268
+ Connect.INSTANCE.registerFormField(textView, activity);
272
269
  }
273
270
 
274
271
  /**
275
272
  * Requests that the framework logs the click events on any UIControl or View. Click event is a
276
273
  * normalized form of touch up inside event.
277
274
  *
278
- * @param targetViewId A valid native View Id for lookup.
279
- * @param accessibilityID Assessibility ID(virtual id).
280
- * @param promise Javascript Promise interface.
275
+ * @param targetViewId A valid native View Id for lookup.
276
+ * @param accessibilityID Accessibility ID(virtual id).
277
+ * @param promise Javascript Promise interface.
281
278
  */
282
279
  @ReactMethod
283
280
  public void logClickEvent(final int targetViewId, final String accessibilityID, final Promise promise) {
@@ -286,24 +283,22 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
286
283
  // Add UI-block so we can get a valid reference to the map-view
287
284
  final UIManagerModule uiManager = context.getNativeModule(UIManagerModule.class);
288
285
 
289
- uiManager.addUIBlock(new UIBlock() {
290
- public void execute(NativeViewHierarchyManager nvhm) {
291
- final View view = nvhm.resolveView(targetViewId);
286
+ Objects.requireNonNull(uiManager).addUIBlock(nvhm -> {
287
+ final View view = nvhm.resolveView(targetViewId);
292
288
 
293
- if (view == null) {
294
- updateResult(null, promise);
289
+ if (view == null) {
290
+ updateResult(null, promise);
291
+ } else {
292
+ if (view instanceof EditText) {
293
+ addFocusAndRegister((EditText) view, null, getCurrentActivity());
295
294
  } else {
296
- if (view instanceof EditText) {
297
- addFocusAndRegister((EditText) view, null, getCurrentActivity());
295
+ if (!TextUtils.isEmpty(accessibilityID)) {
296
+ Connect.INSTANCE.logEvent(view, "click", accessibilityID);
298
297
  } else {
299
- if (!TextUtils.isEmpty(accessibilityID)) {
300
- Connect.logEvent(view, "click", accessibilityID);
301
- } else {
302
- Connect.logEvent(view, "click");
303
- }
298
+ Connect.INSTANCE.logEvent(view, "click");
304
299
  }
305
- updateResult(true, promise);
306
300
  }
301
+ updateResult(true, promise);
307
302
  }
308
303
  });
309
304
  } catch (Exception e) {
@@ -311,6 +306,12 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
311
306
  }
312
307
  }
313
308
 
309
+ /**
310
+ * Log click events on react native control.
311
+ *
312
+ * @param targetViewId Target id of the control.
313
+ * @param promise Javascript Promise interface.
314
+ */
314
315
  @ReactMethod
315
316
  public void logClickEvent(final int targetViewId, final Promise promise) {
316
317
  try {
@@ -318,20 +319,18 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
318
319
  // Add UI-block so we can get a valid reference to the map-view
319
320
  final UIManagerModule uiManager = context.getNativeModule(UIManagerModule.class);
320
321
 
321
- uiManager.addUIBlock(new UIBlock() {
322
- public void execute(NativeViewHierarchyManager nvhm) {
323
- final View view = nvhm.resolveView(targetViewId);
322
+ Objects.requireNonNull(uiManager).addUIBlock(nvhm -> {
323
+ final View view = nvhm.resolveView(targetViewId);
324
324
 
325
- if (view == null) {
326
- updateResult(null, promise);
325
+ if (view == null) {
326
+ updateResult(null, promise);
327
+ } else {
328
+ if (view instanceof EditText) {
329
+ addFocusAndRegister((EditText) view, null, getCurrentActivity());
327
330
  } else {
328
- if (view instanceof EditText) {
329
- addFocusAndRegister((EditText) view, null, getCurrentActivity());
330
- } else {
331
- Connect.logEvent(view, "click");
332
- }
333
- updateResult(true, promise);
331
+ Connect.INSTANCE.logEvent(view, "click");
334
332
  }
333
+ updateResult(true, promise);
335
334
  }
336
335
  });
337
336
  } catch (Exception e) {
@@ -342,10 +341,10 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
342
341
  /**
343
342
  * Log EditText change event.
344
343
  *
345
- * @param targetViewId A valid native View Id for lookup.
346
- * @param accessibilityID Assessibility ID(virtual id).
347
- * @param text The input string
348
- * @param promise Javascript Promise interface.
344
+ * @param targetViewId A valid native View Id for lookup.
345
+ * @param accessibilityID Accessibility ID(virtual id).
346
+ * @param text The input string
347
+ * @param promise Javascript Promise interface.
349
348
  */
350
349
  @ReactMethod
351
350
  public void logTextChangeEvent(final int targetViewId, final String accessibilityID, final String text, final Promise promise) {
@@ -354,20 +353,18 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
354
353
  // Add UI-block so we can get a valid reference to the map-view
355
354
  final UIManagerModule uiManager = context.getNativeModule(UIManagerModule.class);
356
355
 
357
- uiManager.addUIBlock(new UIBlock() {
358
- public void execute(NativeViewHierarchyManager nvhm) {
359
- final View view = nvhm.resolveView(targetViewId);
356
+ Objects.requireNonNull(uiManager).addUIBlock(nvhm -> {
357
+ final View view = nvhm.resolveView(targetViewId);
360
358
 
361
- if (view == null) {
362
- updateResult(null, promise);
363
- } else {
364
- if (view instanceof EditText && ((EditText) view).getOnFocusChangeListener() == null) {
365
- // First time, logEvent and subsequent calls will be handled in change listener
366
- Connect.logEvent(view, Connect.TLF_ON_FOCUS_CHANGE_IN, accessibilityID);
367
- addFocusAndRegister((EditText) view, accessibilityID, getCurrentActivity());
368
- }
369
- updateResult(true, promise);
359
+ if (view == null) {
360
+ updateResult(null, promise);
361
+ } else {
362
+ if (view instanceof EditText && ((EditText) view).getOnFocusChangeListener() == null) {
363
+ // First time, logEvent and subsequent calls will be handled in change listener
364
+ Connect.INSTANCE.logEvent(view, Connect.TLF_ON_FOCUS_CHANGE_IN, accessibilityID);
365
+ addFocusAndRegister((EditText) view, accessibilityID, getCurrentActivity());
370
366
  }
367
+ updateResult(true, promise);
371
368
  }
372
369
  });
373
370
  } catch (Exception e) {
@@ -384,7 +381,7 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
384
381
  */
385
382
  @ReactMethod
386
383
  public void logScreenViewContextLoad(final String logicalPageName, final String referrer, final Promise promise) {
387
- final boolean result = Connect.logScreenview(getCurrentActivity(), logicalPageName, ScreenviewType.LOAD, referrer);
384
+ final boolean result = Connect.INSTANCE.logScreenview(Objects.requireNonNull(getCurrentActivity()), logicalPageName, ScreenviewType.LOAD, referrer);
388
385
  updateResult(result, promise);
389
386
  }
390
387
 
@@ -397,7 +394,27 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
397
394
  */
398
395
  @ReactMethod
399
396
  public void logScreenViewContextUnLoad(final String logicalPageName, final String referrer, final Promise promise) {
400
- final boolean result = Connect.logScreenview(getCurrentActivity(), logicalPageName, ScreenviewType.UNLOAD, referrer);
397
+ final boolean result = Connect.INSTANCE.logScreenview(Objects.requireNonNull(getCurrentActivity()), logicalPageName, ScreenviewType.UNLOAD, referrer);
398
+ updateResult(result, promise);
399
+ }
400
+
401
+ /**
402
+ * Log signal json data.
403
+ *
404
+ * @param signalJSON React-Native compatible map type.
405
+ * @param logLevel The monitoring level of the event.
406
+ * @param promise Javascript Promise interface.
407
+ */
408
+ @ReactMethod
409
+ public void logSignal(final ReadableMap signalJSON, final int logLevel, final Promise promise) {
410
+ HashMap<String, Object> map = new HashMap<>();
411
+
412
+ // Convert to conform with React-Native MAP type
413
+ for (Map.Entry<String, Object> entry : signalJSON.toHashMap().entrySet()) {
414
+ map.put(entry.getKey(), entry.getValue().toString());
415
+ }
416
+
417
+ final boolean result = Connect.INSTANCE.logSignal(map, logLevel);
401
418
  updateResult(result, promise);
402
419
  }
403
420
 
@@ -408,32 +425,42 @@ public class RNCxaModule extends ReactContextBaseJavaModule implements Lifecycle
408
425
  * @param promise Javascript Promise interface.
409
426
  */
410
427
  private void updateResult(Object result, Promise promise) {
411
- if ((result != null) && ((Boolean) result) == true) {
412
- promise.resolve(result);
428
+ if ((result != null) && ((Boolean) result)) {
429
+ promise.resolve(true);
413
430
  } else {
414
431
  promise.reject("", "", new Throwable());
415
432
  }
416
433
  }
417
434
 
435
+ /**
436
+ * Used when host resumes.
437
+ */
418
438
  @Override
419
439
  public void onHostResume() {
420
440
  // Initialize Connect library, and hook into activity lifecycle events to help detect if app is in background
421
- if (!Connect.isEnabled()) {
422
- if (Connect.getApplication() == null) {
423
- new Connect((Application) this.reactContext.getApplicationContext());
441
+ if (!Connect.INSTANCE.isEnabled()) {
442
+ if (Connect.INSTANCE.getApplication() == null) {
443
+ Connect.INSTANCE.init((Application) this.reactContext.getApplicationContext());
424
444
  }
425
- Connect.enable();
445
+ Connect.INSTANCE.enable();
426
446
  }
427
- Connect.onResume(getCurrentActivity(), null);
447
+ Connect.INSTANCE.onResume(getCurrentActivity(), null);
428
448
  }
429
449
 
450
+ /**
451
+ * Used when host gets paused.
452
+ */
430
453
  @Override
431
454
  public void onHostPause() {
432
- Connect.onPause(getCurrentActivity(), null);
455
+ Connect.INSTANCE.onPause(getCurrentActivity(), null);
433
456
  }
434
457
 
458
+ /**
459
+ * Used when host gets destroyed.
460
+ */
435
461
  @Override
436
462
  public void onHostDestroy() {
437
- Connect.onDestroy(getCurrentActivity(), null);
463
+ // TODO fix
464
+ // Connect.INSTANCE.onDestroy(getCurrentActivity(), null);
438
465
  }
439
466
  }
@@ -11,6 +11,8 @@
11
11
 
12
12
  package com.tl.uic.rncxa;
13
13
 
14
+ import androidx.annotation.NonNull;
15
+
14
16
  import com.facebook.react.ReactPackage;
15
17
  import com.facebook.react.bridge.NativeModule;
16
18
  import com.facebook.react.bridge.ReactApplicationContext;
@@ -21,13 +23,15 @@ import java.util.Collections;
21
23
  import java.util.List;
22
24
 
23
25
  public class RNCxaPackage implements ReactPackage {
26
+ @NonNull
24
27
  @Override
25
- public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
26
- return Arrays.<NativeModule>asList(new RNCxaModule(reactContext));
28
+ public List<NativeModule> createNativeModules(@NonNull ReactApplicationContext reactContext) {
29
+ return List.of(new RNCxaModule(reactContext));
27
30
  }
28
31
 
32
+ @NonNull
29
33
  @Override
30
- public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
34
+ public List<ViewManager> createViewManagers(@NonNull ReactApplicationContext reactContext) {
31
35
  return Collections.emptyList();
32
36
  }
33
37
  }
@@ -0,0 +1 @@
1
+ {"name":"React-Codegen","version":"0.72.6","summary":"Temp pod for generated files for React Native","homepage":"https://facebook.com/","license":"Unlicense","authors":"Facebook","compiler_flags":"-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32 -Wno-documentation -Wno-nullability-completeness -std=c++17","source":{"git":""},"header_mappings_dir":"./","platforms":{"ios":"12.4"},"source_files":"**/*.{h,mm,cpp}","pod_target_xcconfig":{"HEADER_SEARCH_PATHS":"\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\" \"$(PODS_ROOT)/Headers/Private/React-Fabric\" \"$(PODS_ROOT)/Headers/Private/React-RCTFabric\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-RCTFabric/RCTFabric.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-debug/React_debug.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-utils/React_utils.framework/Headers\"","FRAMEWORK_SEARCH_PATHS":[]},"dependencies":{"React-jsiexecutor":[],"RCT-Folly":[],"RCTRequired":[],"RCTTypeSafety":[],"React-Core":[],"React-jsi":[],"ReactCommon/turbomodule/bridging":[],"ReactCommon/turbomodule/core":[],"React-NativeModulesApple":[],"glog":[],"DoubleConversion":[],"React-jsc":[],"React-rncore":[],"FBReactNativeSpec":[]}}
package/latestChanges CHANGED
@@ -25,4 +25,3 @@ Known Issues
25
25
 
26
26
  - After iOS 13, library no longer supports iPad because of Apple changes in iPad OS.
27
27
  - Dual sim features are in beta. Example information using multiple carriers.
28
-
package/package.json CHANGED
@@ -38,5 +38,5 @@
38
38
  "verifyConnectSetup": "node scripts/verifyConnectSetup.js $INIT_CWD"
39
39
  },
40
40
  "summary": "react-native ios android tealeaf connect cxa wxca er enhanced-replay",
41
- "version": "16.0.6"
41
+ "version": "16.0.7"
42
42
  }