react-native-roxit-code-scanner 0.1.2 → 0.1.3
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.
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
package com.roxitcodescanner;
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import android.util.Log;
|
|
4
4
|
import android.content.IntentFilter;
|
|
5
|
+
|
|
5
6
|
import com.facebook.react.bridge.Promise;
|
|
6
7
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
7
8
|
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
8
9
|
import com.facebook.react.bridge.ReactMethod;
|
|
9
|
-
import com.facebook.react.module.annotations.ReactModule;
|
|
10
10
|
|
|
11
|
-
@ReactModule(name = RoxitCodeScannerModule.NAME)
|
|
12
11
|
public class RoxitCodeScannerModule extends ReactContextBaseJavaModule {
|
|
13
|
-
public static
|
|
12
|
+
public static ReactApplicationContext reactContext;
|
|
14
13
|
|
|
15
14
|
public RoxitCodeScannerModule(ReactApplicationContext reactContext) {
|
|
16
15
|
super(reactContext);
|
|
@@ -20,17 +19,8 @@ public class RoxitCodeScannerModule extends ReactContextBaseJavaModule {
|
|
|
20
19
|
reactContext.registerReceiver(new ScannerReceiver(), new IntentFilter("scode"));
|
|
21
20
|
}
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
// Example method
|
|
31
|
-
// See https://reactnative.dev/docs/native-modules-android
|
|
32
|
-
@ReactMethod
|
|
33
|
-
public void multiply(double a, double b, Promise promise) {
|
|
34
|
-
promise.resolve(a * b);
|
|
35
|
-
}
|
|
22
|
+
@Override
|
|
23
|
+
public String getName() {
|
|
24
|
+
return "ScannerBroadcast";
|
|
25
|
+
}
|
|
36
26
|
}
|