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 androidx.annotation.NonNull;
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 final String NAME = "RoxitCodeScanner";
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
- @Override
24
- @NonNull
25
- public String getName() {
26
- return NAME;
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-roxit-code-scanner",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "test",
5
5
  "main": "index.js",
6
6
  "scripts": {