react-native-roxit-code-scanner 1.0.2 → 1.0.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.
package/.idea/php.xml
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="MessDetectorOptionsConfiguration">
|
|
4
|
+
<option name="transferred" value="true" />
|
|
5
|
+
</component>
|
|
6
|
+
<component name="PHPCSFixerOptionsConfiguration">
|
|
7
|
+
<option name="transferred" value="true" />
|
|
8
|
+
</component>
|
|
9
|
+
<component name="PHPCodeSnifferOptionsConfiguration">
|
|
10
|
+
<option name="highlightLevel" value="WARNING" />
|
|
11
|
+
<option name="transferred" value="true" />
|
|
12
|
+
</component>
|
|
13
|
+
<component name="PhpStanOptionsConfiguration">
|
|
14
|
+
<option name="transferred" value="true" />
|
|
15
|
+
</component>
|
|
16
|
+
<component name="PsalmOptionsConfiguration">
|
|
17
|
+
<option name="transferred" value="true" />
|
|
18
|
+
</component>
|
|
19
|
+
</project>
|
package/README.md
CHANGED
|
@@ -16,6 +16,7 @@ public class RoxitCodeScannerModule extends ReactContextBaseJavaModule {
|
|
|
16
16
|
this.reactContext = reactContext;
|
|
17
17
|
reactContext.registerReceiver(new ScannerReceiver(), new IntentFilter("com.xcheng.scanner.action.BARCODE_DECODING_BROADCAST"));
|
|
18
18
|
reactContext.registerReceiver(new ScannerReceiver(), new IntentFilter("android.intent.ACTION_DECODE_DATA"));
|
|
19
|
+
reactContext.registerReceiver(new ScannerReceiver(), new IntentFilter("scan.rcv.message"));
|
|
19
20
|
reactContext.registerReceiver(new ScannerReceiver(), new IntentFilter("barcode"));
|
|
20
21
|
}
|
|
21
22
|
|
|
@@ -39,6 +39,12 @@ public class ScannerReceiver extends BroadcastReceiver {
|
|
|
39
39
|
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
|
|
40
40
|
.emit("barcode", intent.getStringExtra("barcode_string"));
|
|
41
41
|
}
|
|
42
|
+
if (intent.getAction().equals("scan.rcv.message")) {
|
|
43
|
+
rnApp.getReactNativeHost().getReactInstanceManager()
|
|
44
|
+
.getCurrentReactContext()
|
|
45
|
+
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
|
|
46
|
+
.emit("barcode", intent.getStringExtra("barcodeData"));
|
|
47
|
+
}
|
|
42
48
|
if (intent.getAction().equals("barcode")) {
|
|
43
49
|
rnApp.getReactNativeHost().getReactInstanceManager()
|
|
44
50
|
.getCurrentReactContext()
|