react-native-roxit-code-scanner 1.0.24 → 1.0.26

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.
@@ -31,7 +31,8 @@ public class RoxitCodeScannerModule extends ReactContextBaseJavaModule {
31
31
  .emit("barcode", intent.getStringExtra("EXTRA_BARCODE_DECODING_DATA"));
32
32
  }
33
33
  }
34
- }, new IntentFilter("com.xcheng.scanner.action.BARCODE_DECODING_BROADCAST"));
34
+ }, new IntentFilter("com.xcheng.scanner.action.BARCODE_DECODING_BROADCAST"), RECEIVER_NOT_EXPORTED);
35
+
35
36
  reactContext.registerReceiver(new BroadcastReceiver() {
36
37
  @Override
37
38
  public void onReceive(Context context, Intent intent) {
@@ -41,7 +42,8 @@ public class RoxitCodeScannerModule extends ReactContextBaseJavaModule {
41
42
  .emit("barcode", intent.getStringExtra("barcode_string"));
42
43
  }
43
44
  }
44
- }, new IntentFilter("android.intent.ACTION_DECODE_DATA"));
45
+ }, new IntentFilter("android.intent.ACTION_DECODE_DATA"), RECEIVER_NOT_EXPORTED);
46
+
45
47
  reactContext.registerReceiver(new BroadcastReceiver() {
46
48
  @Override
47
49
  public void onReceive(Context context, Intent intent) {
@@ -51,7 +53,8 @@ public class RoxitCodeScannerModule extends ReactContextBaseJavaModule {
51
53
  .emit("barcode", intent.getStringExtra("barcodeData"));
52
54
  }
53
55
  }
54
- }, new IntentFilter("scan.rcv.message"));
56
+ }, new IntentFilter("scan.rcv.message"), RECEIVER_NOT_EXPORTED);
57
+
55
58
  reactContext.registerReceiver(new BroadcastReceiver() {
56
59
  @Override
57
60
  public void onReceive(Context context, Intent intent) {
@@ -61,7 +64,7 @@ public class RoxitCodeScannerModule extends ReactContextBaseJavaModule {
61
64
  .emit("barcode", intent.getStringExtra("barcode"));
62
65
  }
63
66
  }
64
- }, new IntentFilter("barcode"));
67
+ }, new IntentFilter("barcode"), RECEIVER_NOT_EXPORTED);
65
68
  }
66
69
 
67
70
  @Override
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @providesModule AndroidWifiModule
2
+ * @providesModule RoxitCodeScannerModule
3
3
  */
4
4
 
5
5
  'use strict';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-roxit-code-scanner",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "description": "Broadcast code scanner receiver",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,138 +0,0 @@
1
- //buildscript {
2
- // repositories {
3
- // google()
4
- // mavenCentral()
5
- // }
6
- //
7
- // dependencies {
8
- // classpath 'com.android.tools.build:gradle:3.5.3'
9
- // }
10
- //}
11
-
12
- //def isNewArchitectureEnabled() {
13
- // return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
14
- //}
15
-
16
- apply plugin: 'com.android.library'
17
-
18
- //if (isNewArchitectureEnabled()) {
19
- // apply plugin: 'com.facebook.react'
20
- //}
21
-
22
- def getExtOrDefault(name) {
23
- return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['RoxitCodeScanner_' + name]
24
- }
25
-
26
- def getExtOrIntegerDefault(name) {
27
- return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['RoxitCodeScanner_' + name]).toInteger()
28
- }
29
-
30
- android {
31
- compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
32
-
33
- defaultConfig {
34
- minSdkVersion getExtOrIntegerDefault('minSdkVersion')
35
- targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
36
- //buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
37
- }
38
- buildTypes {
39
- release {
40
- minifyEnabled false
41
- }
42
- }
43
-
44
- lintOptions {
45
- disable 'GradleCompatible'
46
- }
47
-
48
- compileOptions {
49
- sourceCompatibility JavaVersion.VERSION_1_8
50
- targetCompatibility JavaVersion.VERSION_1_8
51
- }
52
-
53
- }
54
-
55
- //repositories {
56
- // mavenCentral()
57
- // google()
58
- //
59
- // def found = false
60
- // def defaultDir = null
61
- // def androidSourcesName = 'React Native sources'
62
- //
63
- // if (rootProject.ext.has('reactNativeAndroidRoot')) {
64
- // defaultDir = rootProject.ext.get('reactNativeAndroidRoot')
65
- // } else {
66
- // defaultDir = new File(
67
- // projectDir,
68
- // '/../../../node_modules/react-native/android'
69
- // )
70
- // }
71
- //
72
- // if (defaultDir.exists()) {
73
- // maven {
74
- // url defaultDir.toString()
75
- // name androidSourcesName
76
- // }
77
- //
78
- // logger.info(":${project.name}:reactNativeAndroidRoot ${defaultDir.canonicalPath}")
79
- // found = true
80
- // } else {
81
- // def parentDir = rootProject.projectDir
82
- //
83
- // 1.upto(5, {
84
- // if (found) return true
85
- // parentDir = parentDir.parentFile
86
- //
87
- // def androidSourcesDir = new File(
88
- // parentDir,
89
- // 'node_modules/react-native'
90
- // )
91
- //
92
- // def androidPrebuiltBinaryDir = new File(
93
- // parentDir,
94
- // 'node_modules/react-native/android'
95
- // )
96
- //
97
- // if (androidPrebuiltBinaryDir.exists()) {
98
- // maven {
99
- // url androidPrebuiltBinaryDir.toString()
100
- // name androidSourcesName
101
- // }
102
- //
103
- // logger.info(":${project.name}:reactNativeAndroidRoot ${androidPrebuiltBinaryDir.canonicalPath}")
104
- // found = true
105
- // } else if (androidSourcesDir.exists()) {
106
- // maven {
107
- // url androidSourcesDir.toString()
108
- // name androidSourcesName
109
- // }
110
- //
111
- // logger.info(":${project.name}:reactNativeAndroidRoot ${androidSourcesDir.canonicalPath}")
112
- // found = true
113
- // }
114
- // })
115
- // }
116
- //
117
- // if (!found) {
118
- // throw new GradleException(
119
- // "${project.name}: unable to locate React Native android sources. " +
120
- // "Ensure you have you installed React Native as a dependency in your project and try again."
121
- // )
122
- // }
123
- //}
124
-
125
-
126
- dependencies {
127
- //noinspection GradleDynamicVersion
128
- implementation "com.facebook.react:react-native:+"
129
- // From node_modules
130
- }
131
-
132
- //if (isNewArchitectureEnabled()) {
133
- // react {
134
- // jsRootDir = file("../src/")
135
- // libraryName = "RoxitCodeScanner"
136
- // codegenJavaPackageName = "com.roxitcodescanner"
137
- // }
138
- //}