anyline-ocr-react-native-module 42.2.0 → 43.0.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.
- package/.idea/modules.xml +8 -0
- package/.idea/plugin.iml +9 -0
- package/.idea/vcs.xml +6 -0
- package/android/.gradle/6.7/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.0/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.0/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.0/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.0/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.0/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.0/gc.properties +0 -0
- package/android/.gradle/7.3/checksums/checksums.lock +0 -0
- package/android/.gradle/7.3/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.3/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.3/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.3/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.3/gc.properties +0 -0
- package/android/.gradle/7.4/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/7.4/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.4/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.4/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.4/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.4/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.4/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/7.4/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/.idea/gradle.xml +1 -0
- package/android/.idea/jarRepositories.xml +5 -0
- package/android/.idea/misc.xml +1 -1
- package/android/.idea/vcs.xml +1 -0
- package/android/build.gradle +7 -3
- package/android/src/main/AndroidManifest.xml +9 -8
- package/android/src/main/assets/cow_tag_scanner.ale +46 -0
- package/android/src/main/java/com/anyline/reactnative/AnylinePackage.java +1 -2
- package/android/src/main/java/com/anyline/reactnative/AnylineSDKPlugin.java +25 -77
- package/android/src/main/java/com/anyline/reactnative/RotateButtonConfig.java +12 -2
- package/android/src/main/java/com/anyline/reactnative/ScanActivity.java +206 -0
- package/android/src/main/res/drawable/rotate_screen_background.xml +18 -0
- package/android/src/main/res/drawable/rotate_screen_white.png +0 -0
- package/android/src/main/res/layout/activity_scan.xml +27 -0
- package/android/src/main/res/values/anyline_sdk_plugin_strings.xml +2 -28
- package/ios/ALJsonUIConfiguration.h +29 -36
- package/ios/ALJsonUIConfiguration.m +136 -76
- package/ios/ALNFCScanViewController.h +3 -16
- package/ios/ALNFCScanViewController.m +361 -232
- package/ios/ALPluginHelper.h +19 -62
- package/ios/ALPluginHelper.m +208 -529
- package/ios/ALPluginScanViewController.h +5 -32
- package/ios/ALPluginScanViewController.m +339 -287
- package/ios/AnylineReact.podspec +4 -3
- package/ios/AnylineSDKPlugin.m +39 -82
- package/package.json +8 -8
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/src/main/java/com/anyline/reactnative/Anyline4Activity.java +0 -621
- package/android/src/main/java/com/anyline/reactnative/AnylineBaseActivity.java +0 -267
- package/android/src/main/java/com/anyline/reactnative/AnylinePluginHelper.java +0 -324
- package/android/src/main/java/com/anyline/reactnative/AnylineUIConfig.java +0 -88
- package/android/src/main/java/com/anyline/reactnative/Document4Activity.java +0 -595
- package/android/src/main/res/layout/activity_scan_document.xml +0 -63
- package/android/src/main/res/layout/activity_scan_scanview.xml +0 -52
- package/android/src/main/res/values/com_crashlytics_export_strings.xml +0 -10
package/.idea/plugin.iml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="JAVA_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
+
<exclude-output />
|
|
5
|
+
<content url="file://$MODULE_DIR$" />
|
|
6
|
+
<orderEntry type="inheritedJdk" />
|
|
7
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
8
|
+
</component>
|
|
9
|
+
</module>
|
package/.idea/vcs.xml
ADDED
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#
|
|
1
|
+
#Thu Jan 12 14:36:20 CET 2023
|
|
2
2
|
gradle.version=6.7
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/.idea/gradle.xml
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
<option name="testRunner" value="GRADLE" />
|
|
8
8
|
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
|
9
9
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
|
10
|
+
<option name="gradleJvm" value="Embedded JDK" />
|
|
10
11
|
<option name="modules">
|
|
11
12
|
<set>
|
|
12
13
|
<option value="$PROJECT_DIR$" />
|
|
@@ -31,5 +31,10 @@
|
|
|
31
31
|
<option name="name" value="maven" />
|
|
32
32
|
<option name="url" value="https://anylinesdk.blob.core.windows.net/maven/" />
|
|
33
33
|
</remote-repository>
|
|
34
|
+
<remote-repository>
|
|
35
|
+
<option name="id" value="MavenRepo" />
|
|
36
|
+
<option name="name" value="MavenRepo" />
|
|
37
|
+
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
|
38
|
+
</remote-repository>
|
|
34
39
|
</component>
|
|
35
40
|
</project>
|
package/android/.idea/misc.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<project version="4">
|
|
3
3
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
|
4
|
-
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="
|
|
4
|
+
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
|
|
5
5
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
|
6
6
|
</component>
|
|
7
7
|
<component name="ProjectType">
|
package/android/.idea/vcs.xml
CHANGED
package/android/build.gradle
CHANGED
|
@@ -3,7 +3,7 @@ apply plugin: "com.android.library"
|
|
|
3
3
|
buildscript {
|
|
4
4
|
repositories {
|
|
5
5
|
google()
|
|
6
|
-
|
|
6
|
+
mavenCentral()
|
|
7
7
|
}
|
|
8
8
|
dependencies {
|
|
9
9
|
classpath 'com.android.tools.build:gradle:4.1.3'
|
|
@@ -13,7 +13,7 @@ buildscript {
|
|
|
13
13
|
allprojects {
|
|
14
14
|
repositories {
|
|
15
15
|
google()
|
|
16
|
-
|
|
16
|
+
mavenCentral()
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -52,6 +52,10 @@ android {
|
|
|
52
52
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
buildFeatures {
|
|
56
|
+
viewBinding true
|
|
57
|
+
dataBinding true
|
|
58
|
+
}
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
repositories {
|
|
@@ -65,7 +69,7 @@ repositories {
|
|
|
65
69
|
|
|
66
70
|
dependencies {
|
|
67
71
|
implementation fileTree(dir: "libs", include: ["*.jar"])
|
|
68
|
-
implementation 'io.anyline:anylinesdk:
|
|
72
|
+
implementation 'io.anyline:anylinesdk:43.1.0'
|
|
69
73
|
implementation "com.facebook.react:react-native:+" // from node_modules
|
|
70
74
|
implementation("com.google.android.material:material:1.4.0-rc01")
|
|
71
75
|
implementation 'androidx.multidex:multidex:2.0.1'
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
-
|
|
3
|
+
package="com.anyline.reactnative">
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
<uses-permission android:name="android.permission.INTERNET" />
|
|
6
|
+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
|
7
|
+
<uses-permission android:name="android.permission.CAMERA" />
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
<application android:allowBackup="true">
|
|
10
|
+
<activity
|
|
11
|
+
android:name=".ScanActivity"
|
|
12
|
+
android:screenOrientation="portrait" />
|
|
13
|
+
</application>
|
|
13
14
|
</manifest>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cameraConfig": {
|
|
3
|
+
"captureResolution": "1080p"
|
|
4
|
+
},
|
|
5
|
+
"flashConfig": {
|
|
6
|
+
"mode": "auto",
|
|
7
|
+
"alignment": "bottom_right"
|
|
8
|
+
},
|
|
9
|
+
"viewPluginConfig": {
|
|
10
|
+
"pluginConfig": {
|
|
11
|
+
"id": "Barcode|Barcodes",
|
|
12
|
+
"barcodeConfig": {
|
|
13
|
+
"barcodeFormats": [
|
|
14
|
+
"ALL"
|
|
15
|
+
],
|
|
16
|
+
"parseAAMVA": true
|
|
17
|
+
},
|
|
18
|
+
"cancelOnResult": false
|
|
19
|
+
},
|
|
20
|
+
"cutoutConfig": {
|
|
21
|
+
"style": "rect",
|
|
22
|
+
"maxWidthPercent": "80%",
|
|
23
|
+
"maxHeightPercent": "80%",
|
|
24
|
+
"alignment": "center",
|
|
25
|
+
"ratioFromSize": {
|
|
26
|
+
"width": 100,
|
|
27
|
+
"height": 80
|
|
28
|
+
},
|
|
29
|
+
"strokeWidth": 1,
|
|
30
|
+
"cornerRadius": 3,
|
|
31
|
+
"strokeColor": "FFFFFF",
|
|
32
|
+
"outerColor": "000000",
|
|
33
|
+
"outerAlpha": 0.3,
|
|
34
|
+
"feedbackStrokeColor": "0099FF"
|
|
35
|
+
},
|
|
36
|
+
"scanFeedbackConfig": {
|
|
37
|
+
"style": "rect",
|
|
38
|
+
"strokeColor": "0099FF",
|
|
39
|
+
"fillColor": "220099FF",
|
|
40
|
+
"animationDuration": 150,
|
|
41
|
+
"blinkAnimationOnResult": true,
|
|
42
|
+
"beepOnResult": true,
|
|
43
|
+
"vibrateOnResult": true
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -22,8 +22,7 @@ public class AnylinePackage implements ReactPackage {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
@Override
|
|
25
|
-
public List<NativeModule> createNativeModules(
|
|
26
|
-
ReactApplicationContext reactContext) {
|
|
25
|
+
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
|
|
27
26
|
List<NativeModule> modules = new ArrayList<>();
|
|
28
27
|
modules.add(new AnylineSDKPlugin(reactContext));
|
|
29
28
|
return modules;
|
|
@@ -4,12 +4,10 @@ package com.anyline.reactnative;
|
|
|
4
4
|
* Created by jonesBoi on 02.12.16.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import android.app.Activity;
|
|
8
7
|
import android.content.Intent;
|
|
9
8
|
|
|
10
9
|
import com.anyline.reactnative.updateAsset.AnylineUpdateDelegateImpl;
|
|
11
10
|
import com.anyline.reactnative.updateAsset.AssetContextJsonParser;
|
|
12
|
-
import com.facebook.react.ReactInstanceManager;
|
|
13
11
|
import com.facebook.react.bridge.Callback;
|
|
14
12
|
import com.facebook.react.bridge.Promise;
|
|
15
13
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
@@ -19,13 +17,12 @@ import com.facebook.react.bridge.ReactMethod;
|
|
|
19
17
|
import org.json.JSONException;
|
|
20
18
|
import org.json.JSONObject;
|
|
21
19
|
|
|
22
|
-
import at.nineyards.anyline.core.LicenseException;
|
|
23
|
-
import io.anyline.AnylineSDK;
|
|
24
20
|
import io.anyline.plugin.ScanResult;
|
|
25
21
|
import io.anyline.products.AnylineUpdater;
|
|
26
|
-
import io.anyline.products.IAnylineUpdateDelegate;
|
|
27
22
|
import io.anyline.trainer.AssetContext;
|
|
28
23
|
import io.anyline.trainer.TrainerUtils;
|
|
24
|
+
import io.anyline2.AnylineSdk;
|
|
25
|
+
import io.anyline2.core.LicenseException;
|
|
29
26
|
|
|
30
27
|
class AnylineSDKPlugin extends ReactContextBaseJavaModule implements ResultReporter.OnResultListener {
|
|
31
28
|
|
|
@@ -40,18 +37,6 @@ class AnylineSDKPlugin extends ReactContextBaseJavaModule implements ResultRepor
|
|
|
40
37
|
public static final int RESULT_CANCELED = 0;
|
|
41
38
|
public static final int RESULT_OK = 1;
|
|
42
39
|
public static final int RESULT_ERROR = 2;
|
|
43
|
-
public static final int DIGITAL_METER = 3;
|
|
44
|
-
public static final int ANALOG_METER = 4;
|
|
45
|
-
public static final int AUTO_ANALOG_DIGITAL_METER = 5;
|
|
46
|
-
public static final int ANYLINE_OCR = 6;
|
|
47
|
-
public static final int BARCODE = 7;
|
|
48
|
-
public static final int ANYLINE_MRZ = 8;
|
|
49
|
-
public static final int ANYLINE_DOCUMENT = 9;
|
|
50
|
-
public static final int DIAL_METER = 10;
|
|
51
|
-
public static final int LICENSE_PLATE = 11;
|
|
52
|
-
public static final int SERIAL_NUMBER = 12;
|
|
53
|
-
public static final int DOT_MATRIX_METER = 13;
|
|
54
|
-
public static final int REQUEST_ANYLINE_4 = 14;
|
|
55
40
|
private static final String E_ERROR = "E_ERROR";
|
|
56
41
|
private JSONObject configObject;
|
|
57
42
|
private ReactApplicationContext reactContext;
|
|
@@ -60,10 +45,8 @@ class AnylineSDKPlugin extends ReactContextBaseJavaModule implements ResultRepor
|
|
|
60
45
|
private Callback onResultCallback;
|
|
61
46
|
private Callback onErrorCallback;
|
|
62
47
|
private Promise promise;
|
|
63
|
-
private ReactInstanceManager mReactInstanceManager;
|
|
64
48
|
private String returnMethod;
|
|
65
49
|
private String config;
|
|
66
|
-
private IAnylineUpdateDelegate anylineUpdateDelegate;
|
|
67
50
|
private AssetContextJsonParser assetContextJsonParser;
|
|
68
51
|
|
|
69
52
|
AnylineSDKPlugin(ReactApplicationContext context) {
|
|
@@ -111,28 +94,17 @@ class AnylineSDKPlugin extends ReactContextBaseJavaModule implements ResultRepor
|
|
|
111
94
|
}
|
|
112
95
|
} catch (JSONException e) {
|
|
113
96
|
e.printStackTrace();
|
|
97
|
+
returnError(e.getMessage());
|
|
114
98
|
}
|
|
115
99
|
}
|
|
116
100
|
|
|
117
101
|
@ReactMethod
|
|
118
102
|
public void initSdk(String license) {
|
|
119
103
|
try {
|
|
120
|
-
|
|
104
|
+
AnylineSdk.init(license, reactContext);
|
|
121
105
|
} catch (LicenseException e) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
protected void finishWithError(String identifier, String type) {
|
|
127
|
-
Activity activity = getCurrentActivity();
|
|
128
|
-
|
|
129
|
-
if (activity != null) {
|
|
130
|
-
String errorMessage = activity.getString(activity.getResources().getIdentifier(identifier, type, activity.getPackageName()));
|
|
131
|
-
Intent data = new Intent();
|
|
132
|
-
data.putExtra(AnylineSDKPlugin.EXTRA_ERROR_MESSAGE, errorMessage);
|
|
133
|
-
activity.setResult(AnylineSDKPlugin.RESULT_ERROR, data);
|
|
134
|
-
ResultReporter.onError(errorMessage);
|
|
135
|
-
activity.finish();
|
|
106
|
+
e.printStackTrace();
|
|
107
|
+
returnError(e.getMessage());
|
|
136
108
|
}
|
|
137
109
|
}
|
|
138
110
|
|
|
@@ -190,68 +162,44 @@ class AnylineSDKPlugin extends ReactContextBaseJavaModule implements ResultRepor
|
|
|
190
162
|
private void scanAnyline4() {
|
|
191
163
|
try {
|
|
192
164
|
configObject = new JSONObject(this.config);
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
JSONObject viewPlugin = options.getJSONObject("viewPlugin");
|
|
196
|
-
if (viewPlugin != null && viewPlugin.has("plugin")) {
|
|
197
|
-
JSONObject plugin = viewPlugin.getJSONObject("plugin");
|
|
198
|
-
if (plugin != null && plugin.has("documentPlugin")) {
|
|
199
|
-
scan(Document4Activity.class, null, REQUEST_ANYLINE_4);
|
|
200
|
-
} else {
|
|
201
|
-
scan(Anyline4Activity.class, null, REQUEST_ANYLINE_4);
|
|
202
|
-
}
|
|
203
|
-
} else {
|
|
204
|
-
returnError("No Plugin in config. Please check your configuration.");
|
|
205
|
-
}
|
|
206
|
-
} else if (options.has("serialViewPluginComposite") || options.has("parallelViewPluginComposite")) {
|
|
207
|
-
scan(Anyline4Activity.class, null, REQUEST_ANYLINE_4);
|
|
165
|
+
if (configObject != null) {
|
|
166
|
+
scan();
|
|
208
167
|
} else {
|
|
209
168
|
returnError("No ViewPlugin in config. Please check your configuration.");
|
|
210
169
|
}
|
|
170
|
+
} catch (LicenseException e) {
|
|
171
|
+
e.printStackTrace();
|
|
172
|
+
returnError("LICENSE ERROR: " + e.getMessage());
|
|
211
173
|
} catch (JSONException e) {
|
|
212
174
|
e.printStackTrace();
|
|
175
|
+
returnError("JSON ERROR: " + e.getMessage());
|
|
213
176
|
}
|
|
214
177
|
}
|
|
215
178
|
|
|
216
|
-
private void scan(
|
|
179
|
+
private void scan() throws LicenseException, JSONException {
|
|
217
180
|
|
|
218
|
-
Intent intent = new Intent(getCurrentActivity(),
|
|
181
|
+
Intent intent = new Intent(getCurrentActivity(), ScanActivity.class);
|
|
219
182
|
|
|
220
|
-
|
|
221
|
-
configObject = new JSONObject(this.config);
|
|
183
|
+
configObject = new JSONObject(this.config);
|
|
222
184
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
options.put("cancelOnResult", true);
|
|
185
|
+
license = configObject.get("license").toString();
|
|
186
|
+
JSONObject optionsJSONObject = configObject.optJSONObject("options");
|
|
226
187
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
} catch (JSONException e) {
|
|
233
|
-
returnError("JSON ERROR: " + e.getMessage());
|
|
188
|
+
if (optionsJSONObject != null) {
|
|
189
|
+
intent.putExtra(
|
|
190
|
+
EXTRA_ENABLE_BARCODE_SCANNING,
|
|
191
|
+
optionsJSONObject.optBoolean("nativeBarcodeEnabled", false)
|
|
192
|
+
);
|
|
234
193
|
}
|
|
235
194
|
|
|
236
195
|
intent.putExtra(EXTRA_LICENSE_KEY, license);
|
|
237
|
-
intent.putExtra(EXTRA_CONFIG_JSON,
|
|
238
|
-
|
|
239
|
-
// Check if OCR
|
|
240
|
-
if (configObject.has("ocr")) {
|
|
241
|
-
try {
|
|
242
|
-
intent.putExtra(EXTRA_OCR_CONFIG_JSON, configObject.get("ocr").toString());
|
|
243
|
-
} catch (JSONException e) {
|
|
244
|
-
returnError(e.getMessage());
|
|
245
|
-
}
|
|
246
|
-
}
|
|
196
|
+
intent.putExtra(EXTRA_CONFIG_JSON, configObject.toString());
|
|
247
197
|
|
|
248
|
-
if (scanMode != null) {
|
|
249
|
-
intent.putExtra(EXTRA_SCAN_MODE, scanMode);
|
|
250
|
-
}
|
|
251
198
|
ResultReporter.setListener(this);
|
|
252
199
|
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
253
200
|
|
|
254
|
-
|
|
201
|
+
AnylineSdk.init(configObject.getString("license"), reactContext);
|
|
202
|
+
reactContext.startActivityForResult(intent, 1111, intent.getExtras());
|
|
255
203
|
}
|
|
256
204
|
|
|
257
205
|
@Override
|
|
@@ -4,14 +4,24 @@ import org.json.JSONException;
|
|
|
4
4
|
import org.json.JSONObject;
|
|
5
5
|
|
|
6
6
|
public class RotateButtonConfig {
|
|
7
|
+
private String alignment = "";
|
|
7
8
|
private Offset offset = null;
|
|
8
9
|
|
|
9
|
-
public RotateButtonConfig(JSONObject jsonObject)
|
|
10
|
+
public RotateButtonConfig(JSONObject jsonObject) {
|
|
11
|
+
alignment = jsonObject.optString("alignment", "");
|
|
10
12
|
if (jsonObject.has("offset")) {
|
|
11
|
-
|
|
13
|
+
try {
|
|
14
|
+
offset = new Offset(jsonObject.getJSONObject("offset"));
|
|
15
|
+
}
|
|
16
|
+
catch (JSONException e) {
|
|
17
|
+
|
|
18
|
+
}
|
|
12
19
|
}
|
|
13
20
|
}
|
|
14
21
|
|
|
22
|
+
public String getAlignment() {
|
|
23
|
+
return alignment;
|
|
24
|
+
}
|
|
15
25
|
public Offset getOffset() {
|
|
16
26
|
return offset;
|
|
17
27
|
}
|