@rodrigo7/react-native-beacons-manager 1.0.3 → 1.0.5
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/ReactNativeBeaconsManager.podspec +5 -2
- package/android/.gradle/8.0.1/checksums/checksums.lock +0 -0
- package/android/.gradle/8.0.1/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.0.1/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.0.1/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/8.0.1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.0.1/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/8.0.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.0.1/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/config.properties +2 -0
- package/android/.idea/compiler.xml +6 -0
- package/android/.idea/gradle.xml +8 -2
- package/android/.idea/migrations.xml +10 -0
- package/android/.idea/misc.xml +1 -1
- package/android/.idea/other.xml +263 -0
- package/android/build.gradle +1 -2
- package/android/src/main/java/com/mackentoch/beaconsandroid/BeaconsAndroidModule.java +19 -19
- package/ios/RNiBeacon/RNiBeacon/RNiBeacon.m +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Pod::Spec.new do |s|
|
|
2
2
|
s.name = "ReactNativeBeaconsManager"
|
|
3
|
-
s.version = "1.0.
|
|
3
|
+
s.version = "1.0.4"
|
|
4
4
|
s.summary = "React-Native library for detecting beacons (iOS and Android)"
|
|
5
5
|
s.homepage = "https://github.com/rodrigo-nexudus/react-native-beacons-manager#readme"
|
|
6
6
|
s.license = { :type => "MIT" }
|
|
@@ -9,5 +9,8 @@ Pod::Spec.new do |s|
|
|
|
9
9
|
s.source = { :path => "." }
|
|
10
10
|
s.source_files = "ios", "ios/**/*.{h,m}"
|
|
11
11
|
|
|
12
|
-
s.
|
|
12
|
+
s.frameworks = "CoreLocation", "CoreBluetooth"
|
|
13
|
+
s.dependency 'React-Core'
|
|
14
|
+
s.dependency 'React-Core-prebuilt'
|
|
15
|
+
s.dependency 'ReactNativeDependencies'
|
|
13
16
|
end
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/.idea/gradle.xml
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<project version="4">
|
|
3
|
+
<component name="GradleMigrationSettings" migrationVersion="1" />
|
|
3
4
|
<component name="GradleSettings">
|
|
4
5
|
<option name="linkedExternalProjectsSettings">
|
|
5
6
|
<GradleProjectSettings>
|
|
6
|
-
<option name="testRunner" value="GRADLE" />
|
|
7
|
-
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
|
8
7
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
|
8
|
+
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
|
9
|
+
<option name="modules">
|
|
10
|
+
<set>
|
|
11
|
+
<option value="$PROJECT_DIR$" />
|
|
12
|
+
</set>
|
|
13
|
+
</option>
|
|
14
|
+
<option name="resolveExternalAnnotations" value="false" />
|
|
9
15
|
</GradleProjectSettings>
|
|
10
16
|
</option>
|
|
11
17
|
</component>
|
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" project-jdk-name="
|
|
4
|
+
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
|
5
5
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
|
6
6
|
</component>
|
|
7
7
|
<component name="ProjectType">
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="direct_access_persist.xml">
|
|
4
|
+
<option name="deviceSelectionList">
|
|
5
|
+
<list>
|
|
6
|
+
<PersistentDeviceSelectionData>
|
|
7
|
+
<option name="api" value="27" />
|
|
8
|
+
<option name="brand" value="DOCOMO" />
|
|
9
|
+
<option name="codename" value="F01L" />
|
|
10
|
+
<option name="id" value="F01L" />
|
|
11
|
+
<option name="manufacturer" value="FUJITSU" />
|
|
12
|
+
<option name="name" value="F-01L" />
|
|
13
|
+
<option name="screenDensity" value="360" />
|
|
14
|
+
<option name="screenX" value="720" />
|
|
15
|
+
<option name="screenY" value="1280" />
|
|
16
|
+
</PersistentDeviceSelectionData>
|
|
17
|
+
<PersistentDeviceSelectionData>
|
|
18
|
+
<option name="api" value="28" />
|
|
19
|
+
<option name="brand" value="DOCOMO" />
|
|
20
|
+
<option name="codename" value="SH-01L" />
|
|
21
|
+
<option name="id" value="SH-01L" />
|
|
22
|
+
<option name="manufacturer" value="SHARP" />
|
|
23
|
+
<option name="name" value="AQUOS sense2 SH-01L" />
|
|
24
|
+
<option name="screenDensity" value="480" />
|
|
25
|
+
<option name="screenX" value="1080" />
|
|
26
|
+
<option name="screenY" value="2160" />
|
|
27
|
+
</PersistentDeviceSelectionData>
|
|
28
|
+
<PersistentDeviceSelectionData>
|
|
29
|
+
<option name="api" value="31" />
|
|
30
|
+
<option name="brand" value="samsung" />
|
|
31
|
+
<option name="codename" value="a51" />
|
|
32
|
+
<option name="id" value="a51" />
|
|
33
|
+
<option name="manufacturer" value="Samsung" />
|
|
34
|
+
<option name="name" value="Galaxy A51" />
|
|
35
|
+
<option name="screenDensity" value="420" />
|
|
36
|
+
<option name="screenX" value="1080" />
|
|
37
|
+
<option name="screenY" value="2400" />
|
|
38
|
+
</PersistentDeviceSelectionData>
|
|
39
|
+
<PersistentDeviceSelectionData>
|
|
40
|
+
<option name="api" value="34" />
|
|
41
|
+
<option name="brand" value="google" />
|
|
42
|
+
<option name="codename" value="akita" />
|
|
43
|
+
<option name="id" value="akita" />
|
|
44
|
+
<option name="manufacturer" value="Google" />
|
|
45
|
+
<option name="name" value="Pixel 8a" />
|
|
46
|
+
<option name="screenDensity" value="420" />
|
|
47
|
+
<option name="screenX" value="1080" />
|
|
48
|
+
<option name="screenY" value="2400" />
|
|
49
|
+
</PersistentDeviceSelectionData>
|
|
50
|
+
<PersistentDeviceSelectionData>
|
|
51
|
+
<option name="api" value="33" />
|
|
52
|
+
<option name="brand" value="samsung" />
|
|
53
|
+
<option name="codename" value="b0q" />
|
|
54
|
+
<option name="id" value="b0q" />
|
|
55
|
+
<option name="manufacturer" value="Samsung" />
|
|
56
|
+
<option name="name" value="Galaxy S22 Ultra" />
|
|
57
|
+
<option name="screenDensity" value="600" />
|
|
58
|
+
<option name="screenX" value="1440" />
|
|
59
|
+
<option name="screenY" value="3088" />
|
|
60
|
+
</PersistentDeviceSelectionData>
|
|
61
|
+
<PersistentDeviceSelectionData>
|
|
62
|
+
<option name="api" value="32" />
|
|
63
|
+
<option name="brand" value="google" />
|
|
64
|
+
<option name="codename" value="bluejay" />
|
|
65
|
+
<option name="id" value="bluejay" />
|
|
66
|
+
<option name="manufacturer" value="Google" />
|
|
67
|
+
<option name="name" value="Pixel 6a" />
|
|
68
|
+
<option name="screenDensity" value="420" />
|
|
69
|
+
<option name="screenX" value="1080" />
|
|
70
|
+
<option name="screenY" value="2400" />
|
|
71
|
+
</PersistentDeviceSelectionData>
|
|
72
|
+
<PersistentDeviceSelectionData>
|
|
73
|
+
<option name="api" value="29" />
|
|
74
|
+
<option name="brand" value="samsung" />
|
|
75
|
+
<option name="codename" value="crownqlteue" />
|
|
76
|
+
<option name="id" value="crownqlteue" />
|
|
77
|
+
<option name="manufacturer" value="Samsung" />
|
|
78
|
+
<option name="name" value="Galaxy Note9" />
|
|
79
|
+
<option name="screenDensity" value="420" />
|
|
80
|
+
<option name="screenX" value="2220" />
|
|
81
|
+
<option name="screenY" value="1080" />
|
|
82
|
+
</PersistentDeviceSelectionData>
|
|
83
|
+
<PersistentDeviceSelectionData>
|
|
84
|
+
<option name="api" value="34" />
|
|
85
|
+
<option name="brand" value="samsung" />
|
|
86
|
+
<option name="codename" value="dm3q" />
|
|
87
|
+
<option name="id" value="dm3q" />
|
|
88
|
+
<option name="manufacturer" value="Samsung" />
|
|
89
|
+
<option name="name" value="Galaxy S23 Ultra" />
|
|
90
|
+
<option name="screenDensity" value="600" />
|
|
91
|
+
<option name="screenX" value="1440" />
|
|
92
|
+
<option name="screenY" value="3088" />
|
|
93
|
+
</PersistentDeviceSelectionData>
|
|
94
|
+
<PersistentDeviceSelectionData>
|
|
95
|
+
<option name="api" value="33" />
|
|
96
|
+
<option name="brand" value="google" />
|
|
97
|
+
<option name="codename" value="felix" />
|
|
98
|
+
<option name="id" value="felix" />
|
|
99
|
+
<option name="manufacturer" value="Google" />
|
|
100
|
+
<option name="name" value="Pixel Fold" />
|
|
101
|
+
<option name="screenDensity" value="420" />
|
|
102
|
+
<option name="screenX" value="2208" />
|
|
103
|
+
<option name="screenY" value="1840" />
|
|
104
|
+
</PersistentDeviceSelectionData>
|
|
105
|
+
<PersistentDeviceSelectionData>
|
|
106
|
+
<option name="api" value="33" />
|
|
107
|
+
<option name="brand" value="google" />
|
|
108
|
+
<option name="codename" value="felix_camera" />
|
|
109
|
+
<option name="id" value="felix_camera" />
|
|
110
|
+
<option name="manufacturer" value="Google" />
|
|
111
|
+
<option name="name" value="Pixel Fold (Camera-enabled)" />
|
|
112
|
+
<option name="screenDensity" value="420" />
|
|
113
|
+
<option name="screenX" value="2208" />
|
|
114
|
+
<option name="screenY" value="1840" />
|
|
115
|
+
</PersistentDeviceSelectionData>
|
|
116
|
+
<PersistentDeviceSelectionData>
|
|
117
|
+
<option name="api" value="33" />
|
|
118
|
+
<option name="brand" value="samsung" />
|
|
119
|
+
<option name="codename" value="gts8uwifi" />
|
|
120
|
+
<option name="id" value="gts8uwifi" />
|
|
121
|
+
<option name="manufacturer" value="Samsung" />
|
|
122
|
+
<option name="name" value="Galaxy Tab S8 Ultra" />
|
|
123
|
+
<option name="screenDensity" value="320" />
|
|
124
|
+
<option name="screenX" value="1848" />
|
|
125
|
+
<option name="screenY" value="2960" />
|
|
126
|
+
</PersistentDeviceSelectionData>
|
|
127
|
+
<PersistentDeviceSelectionData>
|
|
128
|
+
<option name="api" value="34" />
|
|
129
|
+
<option name="brand" value="google" />
|
|
130
|
+
<option name="codename" value="husky" />
|
|
131
|
+
<option name="id" value="husky" />
|
|
132
|
+
<option name="manufacturer" value="Google" />
|
|
133
|
+
<option name="name" value="Pixel 8 Pro" />
|
|
134
|
+
<option name="screenDensity" value="390" />
|
|
135
|
+
<option name="screenX" value="1008" />
|
|
136
|
+
<option name="screenY" value="2244" />
|
|
137
|
+
</PersistentDeviceSelectionData>
|
|
138
|
+
<PersistentDeviceSelectionData>
|
|
139
|
+
<option name="api" value="30" />
|
|
140
|
+
<option name="brand" value="motorola" />
|
|
141
|
+
<option name="codename" value="java" />
|
|
142
|
+
<option name="id" value="java" />
|
|
143
|
+
<option name="manufacturer" value="Motorola" />
|
|
144
|
+
<option name="name" value="G20" />
|
|
145
|
+
<option name="screenDensity" value="280" />
|
|
146
|
+
<option name="screenX" value="720" />
|
|
147
|
+
<option name="screenY" value="1600" />
|
|
148
|
+
</PersistentDeviceSelectionData>
|
|
149
|
+
<PersistentDeviceSelectionData>
|
|
150
|
+
<option name="api" value="33" />
|
|
151
|
+
<option name="brand" value="google" />
|
|
152
|
+
<option name="codename" value="lynx" />
|
|
153
|
+
<option name="id" value="lynx" />
|
|
154
|
+
<option name="manufacturer" value="Google" />
|
|
155
|
+
<option name="name" value="Pixel 7a" />
|
|
156
|
+
<option name="screenDensity" value="420" />
|
|
157
|
+
<option name="screenX" value="1080" />
|
|
158
|
+
<option name="screenY" value="2400" />
|
|
159
|
+
</PersistentDeviceSelectionData>
|
|
160
|
+
<PersistentDeviceSelectionData>
|
|
161
|
+
<option name="api" value="31" />
|
|
162
|
+
<option name="brand" value="google" />
|
|
163
|
+
<option name="codename" value="oriole" />
|
|
164
|
+
<option name="id" value="oriole" />
|
|
165
|
+
<option name="manufacturer" value="Google" />
|
|
166
|
+
<option name="name" value="Pixel 6" />
|
|
167
|
+
<option name="screenDensity" value="420" />
|
|
168
|
+
<option name="screenX" value="1080" />
|
|
169
|
+
<option name="screenY" value="2400" />
|
|
170
|
+
</PersistentDeviceSelectionData>
|
|
171
|
+
<PersistentDeviceSelectionData>
|
|
172
|
+
<option name="api" value="33" />
|
|
173
|
+
<option name="brand" value="google" />
|
|
174
|
+
<option name="codename" value="panther" />
|
|
175
|
+
<option name="id" value="panther" />
|
|
176
|
+
<option name="manufacturer" value="Google" />
|
|
177
|
+
<option name="name" value="Pixel 7" />
|
|
178
|
+
<option name="screenDensity" value="420" />
|
|
179
|
+
<option name="screenX" value="1080" />
|
|
180
|
+
<option name="screenY" value="2400" />
|
|
181
|
+
</PersistentDeviceSelectionData>
|
|
182
|
+
<PersistentDeviceSelectionData>
|
|
183
|
+
<option name="api" value="31" />
|
|
184
|
+
<option name="brand" value="samsung" />
|
|
185
|
+
<option name="codename" value="q2q" />
|
|
186
|
+
<option name="id" value="q2q" />
|
|
187
|
+
<option name="manufacturer" value="Samsung" />
|
|
188
|
+
<option name="name" value="Galaxy Z Fold3" />
|
|
189
|
+
<option name="screenDensity" value="420" />
|
|
190
|
+
<option name="screenX" value="1768" />
|
|
191
|
+
<option name="screenY" value="2208" />
|
|
192
|
+
</PersistentDeviceSelectionData>
|
|
193
|
+
<PersistentDeviceSelectionData>
|
|
194
|
+
<option name="api" value="34" />
|
|
195
|
+
<option name="brand" value="samsung" />
|
|
196
|
+
<option name="codename" value="q5q" />
|
|
197
|
+
<option name="id" value="q5q" />
|
|
198
|
+
<option name="manufacturer" value="Samsung" />
|
|
199
|
+
<option name="name" value="Galaxy Z Fold5" />
|
|
200
|
+
<option name="screenDensity" value="420" />
|
|
201
|
+
<option name="screenX" value="1812" />
|
|
202
|
+
<option name="screenY" value="2176" />
|
|
203
|
+
</PersistentDeviceSelectionData>
|
|
204
|
+
<PersistentDeviceSelectionData>
|
|
205
|
+
<option name="api" value="30" />
|
|
206
|
+
<option name="brand" value="google" />
|
|
207
|
+
<option name="codename" value="r11" />
|
|
208
|
+
<option name="id" value="r11" />
|
|
209
|
+
<option name="manufacturer" value="Google" />
|
|
210
|
+
<option name="name" value="Pixel Watch" />
|
|
211
|
+
<option name="screenDensity" value="320" />
|
|
212
|
+
<option name="screenX" value="384" />
|
|
213
|
+
<option name="screenY" value="384" />
|
|
214
|
+
<option name="type" value="WEAR_OS" />
|
|
215
|
+
</PersistentDeviceSelectionData>
|
|
216
|
+
<PersistentDeviceSelectionData>
|
|
217
|
+
<option name="api" value="30" />
|
|
218
|
+
<option name="brand" value="google" />
|
|
219
|
+
<option name="codename" value="redfin" />
|
|
220
|
+
<option name="id" value="redfin" />
|
|
221
|
+
<option name="manufacturer" value="Google" />
|
|
222
|
+
<option name="name" value="Pixel 5" />
|
|
223
|
+
<option name="screenDensity" value="440" />
|
|
224
|
+
<option name="screenX" value="1080" />
|
|
225
|
+
<option name="screenY" value="2340" />
|
|
226
|
+
</PersistentDeviceSelectionData>
|
|
227
|
+
<PersistentDeviceSelectionData>
|
|
228
|
+
<option name="api" value="34" />
|
|
229
|
+
<option name="brand" value="google" />
|
|
230
|
+
<option name="codename" value="shiba" />
|
|
231
|
+
<option name="id" value="shiba" />
|
|
232
|
+
<option name="manufacturer" value="Google" />
|
|
233
|
+
<option name="name" value="Pixel 8" />
|
|
234
|
+
<option name="screenDensity" value="420" />
|
|
235
|
+
<option name="screenX" value="1080" />
|
|
236
|
+
<option name="screenY" value="2400" />
|
|
237
|
+
</PersistentDeviceSelectionData>
|
|
238
|
+
<PersistentDeviceSelectionData>
|
|
239
|
+
<option name="api" value="33" />
|
|
240
|
+
<option name="brand" value="google" />
|
|
241
|
+
<option name="codename" value="tangorpro" />
|
|
242
|
+
<option name="id" value="tangorpro" />
|
|
243
|
+
<option name="manufacturer" value="Google" />
|
|
244
|
+
<option name="name" value="Pixel Tablet" />
|
|
245
|
+
<option name="screenDensity" value="320" />
|
|
246
|
+
<option name="screenX" value="1600" />
|
|
247
|
+
<option name="screenY" value="2560" />
|
|
248
|
+
</PersistentDeviceSelectionData>
|
|
249
|
+
<PersistentDeviceSelectionData>
|
|
250
|
+
<option name="api" value="29" />
|
|
251
|
+
<option name="brand" value="samsung" />
|
|
252
|
+
<option name="codename" value="x1q" />
|
|
253
|
+
<option name="id" value="x1q" />
|
|
254
|
+
<option name="manufacturer" value="Samsung" />
|
|
255
|
+
<option name="name" value="Galaxy S20" />
|
|
256
|
+
<option name="screenDensity" value="480" />
|
|
257
|
+
<option name="screenX" value="1440" />
|
|
258
|
+
<option name="screenY" value="3200" />
|
|
259
|
+
</PersistentDeviceSelectionData>
|
|
260
|
+
</list>
|
|
261
|
+
</option>
|
|
262
|
+
</component>
|
|
263
|
+
</project>
|
package/android/build.gradle
CHANGED
|
@@ -30,7 +30,6 @@ android {
|
|
|
30
30
|
|
|
31
31
|
repositories {
|
|
32
32
|
mavenCentral()
|
|
33
|
-
jcenter()
|
|
34
33
|
google()
|
|
35
34
|
|
|
36
35
|
def found = false
|
|
@@ -103,6 +102,6 @@ repositories {
|
|
|
103
102
|
dependencies {
|
|
104
103
|
//noinspection GradleDynamicVersion
|
|
105
104
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
106
|
-
implementation 'com.facebook.react:react-native
|
|
105
|
+
implementation 'com.facebook.react:react-native:+'
|
|
107
106
|
implementation 'org.altbeacon:android-beacon-library:2.19.6'
|
|
108
107
|
}
|
|
@@ -44,7 +44,7 @@ public class BeaconsAndroidModule extends ReactContextBaseJavaModule {
|
|
|
44
44
|
|
|
45
45
|
public BeaconsAndroidModule(ReactApplicationContext reactContext) {
|
|
46
46
|
super(reactContext);
|
|
47
|
-
Log.d(LOG_TAG, "BeaconsAndroidModule - started");
|
|
47
|
+
//Log.d(LOG_TAG, "BeaconsAndroidModule - started");
|
|
48
48
|
this.mReactContext = reactContext;
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -82,7 +82,7 @@ public class BeaconsAndroidModule extends ReactContextBaseJavaModule {
|
|
|
82
82
|
@ReactMethod
|
|
83
83
|
public void addParser(String parser, Callback resolve, Callback reject) {
|
|
84
84
|
try {
|
|
85
|
-
Log.d(LOG_TAG, "BeaconsAndroidModule - addParser: " + parser);
|
|
85
|
+
//Log.d(LOG_TAG, "BeaconsAndroidModule - addParser: " + parser);
|
|
86
86
|
mBeaconManager.getBeaconParsers().add(new BeaconParser().setBeaconLayout(parser));
|
|
87
87
|
resolve.invoke();
|
|
88
88
|
} catch (Exception e) {
|
|
@@ -93,7 +93,7 @@ public class BeaconsAndroidModule extends ReactContextBaseJavaModule {
|
|
|
93
93
|
@ReactMethod
|
|
94
94
|
public void removeParser(String parser, Callback resolve, Callback reject) {
|
|
95
95
|
try {
|
|
96
|
-
Log.d(LOG_TAG, "BeaconsAndroidModule - removeParser: " + parser);
|
|
96
|
+
//Log.d(LOG_TAG, "BeaconsAndroidModule - removeParser: " + parser);
|
|
97
97
|
mBeaconManager.getBeaconParsers().remove(new BeaconParser().setBeaconLayout(parser));
|
|
98
98
|
resolve.invoke();
|
|
99
99
|
} catch (Exception e) {
|
|
@@ -106,7 +106,7 @@ public class BeaconsAndroidModule extends ReactContextBaseJavaModule {
|
|
|
106
106
|
try {
|
|
107
107
|
for (int i = 0; i < parsers.size(); i++) {
|
|
108
108
|
String parser = parsers.getString(i);
|
|
109
|
-
Log.d(LOG_TAG, "addParsersListToDetection - add parser: " + parser);
|
|
109
|
+
//Log.d(LOG_TAG, "addParsersListToDetection - add parser: " + parser);
|
|
110
110
|
mBeaconManager.getBeaconParsers().add(new BeaconParser().setBeaconLayout(parser));
|
|
111
111
|
}
|
|
112
112
|
resolve.invoke(parsers);
|
|
@@ -120,7 +120,7 @@ public class BeaconsAndroidModule extends ReactContextBaseJavaModule {
|
|
|
120
120
|
try {
|
|
121
121
|
for (int i = 0; i < parsers.size(); i++) {
|
|
122
122
|
String parser = parsers.getString(i);
|
|
123
|
-
Log.d(LOG_TAG, "removeParsersListToDetection - remove parser: " + parser);
|
|
123
|
+
//Log.d(LOG_TAG, "removeParsersListToDetection - remove parser: " + parser);
|
|
124
124
|
mBeaconManager.getBeaconParsers().remove(new BeaconParser().setBeaconLayout(parser));
|
|
125
125
|
}
|
|
126
126
|
resolve.invoke(parsers);
|
|
@@ -153,21 +153,21 @@ public class BeaconsAndroidModule extends ReactContextBaseJavaModule {
|
|
|
153
153
|
public void setRssiFilter(int filterType, double avgModifier) {
|
|
154
154
|
String logMsg = "Could not set the rssi filter.";
|
|
155
155
|
if (filterType==RUNNING_AVG_RSSI_FILTER){
|
|
156
|
-
logMsg="Setting filter RUNNING_AVG";
|
|
156
|
+
//logMsg="Setting filter RUNNING_AVG";
|
|
157
157
|
BeaconManager.setRssiFilterImplClass(RunningAverageRssiFilter.class);
|
|
158
158
|
if (avgModifier>0){
|
|
159
159
|
RunningAverageRssiFilter.setSampleExpirationMilliseconds((long) avgModifier);
|
|
160
|
-
logMsg+=" with custom avg modifier";
|
|
160
|
+
//logMsg+=" with custom avg modifier";
|
|
161
161
|
}
|
|
162
162
|
} else if (filterType==ARMA_RSSI_FILTER){
|
|
163
|
-
logMsg="Setting filter ARMA";
|
|
163
|
+
//logMsg="Setting filter ARMA";
|
|
164
164
|
BeaconManager.setRssiFilterImplClass(ArmaRssiFilter.class);
|
|
165
165
|
if (avgModifier>0){
|
|
166
166
|
ArmaRssiFilter.setDEFAULT_ARMA_SPEED(avgModifier);
|
|
167
|
-
logMsg+=" with custom avg modifier";
|
|
167
|
+
//logMsg+=" with custom avg modifier";
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
Log.d(LOG_TAG, logMsg);
|
|
170
|
+
//Log.d(LOG_TAG, logMsg);
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
@ReactMethod
|
|
@@ -207,7 +207,7 @@ public class BeaconsAndroidModule extends ReactContextBaseJavaModule {
|
|
|
207
207
|
**********************************************************************************************/
|
|
208
208
|
@ReactMethod
|
|
209
209
|
public void startMonitoring(String regionId, String beaconUuid, int minor, int major, Callback resolve, Callback reject) {
|
|
210
|
-
Log.d(LOG_TAG, "startMonitoring, monitoringRegionId: " + regionId + ", monitoringBeaconUuid: " + beaconUuid + ", minor: " + minor + ", major: " + major);
|
|
210
|
+
//Log.d(LOG_TAG, "startMonitoring, monitoringRegionId: " + regionId + ", monitoringBeaconUuid: " + beaconUuid + ", minor: " + minor + ", major: " + major);
|
|
211
211
|
try {
|
|
212
212
|
Region region = createRegion(
|
|
213
213
|
regionId,
|
|
@@ -218,7 +218,7 @@ public class BeaconsAndroidModule extends ReactContextBaseJavaModule {
|
|
|
218
218
|
mBeaconManager.startMonitoring(region);
|
|
219
219
|
resolve.invoke();
|
|
220
220
|
} catch (Exception e) {
|
|
221
|
-
Log.e(LOG_TAG, "startMonitoring, error: ", e);
|
|
221
|
+
//Log.e(LOG_TAG, "startMonitoring, error: ", e);
|
|
222
222
|
reject.invoke(e.getMessage());
|
|
223
223
|
}
|
|
224
224
|
}
|
|
@@ -277,7 +277,7 @@ public class BeaconsAndroidModule extends ReactContextBaseJavaModule {
|
|
|
277
277
|
mBeaconManager.stopMonitoring(region);
|
|
278
278
|
resolve.invoke();
|
|
279
279
|
} catch (Exception e) {
|
|
280
|
-
Log.e(LOG_TAG, "stopMonitoring, error: ", e);
|
|
280
|
+
//Log.e(LOG_TAG, "stopMonitoring, error: ", e);
|
|
281
281
|
reject.invoke(e.getMessage());
|
|
282
282
|
}
|
|
283
283
|
}
|
|
@@ -287,13 +287,13 @@ public class BeaconsAndroidModule extends ReactContextBaseJavaModule {
|
|
|
287
287
|
**********************************************************************************************/
|
|
288
288
|
@ReactMethod
|
|
289
289
|
public void startRanging(String regionId, String beaconUuid, Callback resolve, Callback reject) {
|
|
290
|
-
Log.d(LOG_TAG, "startRanging, rangingRegionId: " + regionId + ", rangingBeaconUuid: " + beaconUuid);
|
|
290
|
+
//Log.d(LOG_TAG, "startRanging, rangingRegionId: " + regionId + ", rangingBeaconUuid: " + beaconUuid);
|
|
291
291
|
try {
|
|
292
292
|
Region region = createRegion(regionId, beaconUuid);
|
|
293
293
|
mBeaconManager.startRangingBeacons(region);
|
|
294
294
|
resolve.invoke();
|
|
295
295
|
} catch (Exception e) {
|
|
296
|
-
Log.e(LOG_TAG, "startRanging, error: ", e);
|
|
296
|
+
//Log.e(LOG_TAG, "startRanging, error: ", e);
|
|
297
297
|
reject.invoke(e.getMessage());
|
|
298
298
|
}
|
|
299
299
|
}
|
|
@@ -301,8 +301,8 @@ public class BeaconsAndroidModule extends ReactContextBaseJavaModule {
|
|
|
301
301
|
private RangeNotifier mRangeNotifier = new RangeNotifier() {
|
|
302
302
|
@Override
|
|
303
303
|
public void didRangeBeaconsInRegion(Collection<Beacon> beacons, Region region) {
|
|
304
|
-
Log.d(LOG_TAG, "rangingConsumer didRangeBeaconsInRegion, beacons: " + beacons.toString());
|
|
305
|
-
Log.d(LOG_TAG, "rangingConsumer didRangeBeaconsInRegion, region: " + region.toString());
|
|
304
|
+
//Log.d(LOG_TAG, "rangingConsumer didRangeBeaconsInRegion, beacons: " + beacons.toString());
|
|
305
|
+
//Log.d(LOG_TAG, "rangingConsumer didRangeBeaconsInRegion, region: " + region.toString());
|
|
306
306
|
sendEvent(mReactContext, "beaconsDidRange", createRangingResponse(beacons, region));
|
|
307
307
|
}
|
|
308
308
|
};
|
|
@@ -355,7 +355,7 @@ public class BeaconsAndroidModule extends ReactContextBaseJavaModule {
|
|
|
355
355
|
mBeaconManager.stopRangingBeacons(region);
|
|
356
356
|
resolve.invoke();
|
|
357
357
|
} catch (Exception e) {
|
|
358
|
-
Log.e(LOG_TAG, "stopRanging, error: ", e);
|
|
358
|
+
//Log.e(LOG_TAG, "stopRanging, error: ", e);
|
|
359
359
|
reject.invoke(e.getMessage());
|
|
360
360
|
}
|
|
361
361
|
}
|
|
@@ -384,7 +384,7 @@ public class BeaconsAndroidModule extends ReactContextBaseJavaModule {
|
|
|
384
384
|
}
|
|
385
385
|
|
|
386
386
|
private Region createRegion(String regionId, String beaconUuid) {
|
|
387
|
-
Log.d(LOG_TAG, "Creating following region - Region Id: " + regionId + ", Beacon UUID: " + beaconUuid);
|
|
387
|
+
//Log.d(LOG_TAG, "Creating following region - Region Id: " + regionId + ", Beacon UUID: " + beaconUuid);
|
|
388
388
|
Identifier id1 = (beaconUuid == null) ? null : Identifier.parse(beaconUuid);
|
|
389
389
|
return new Region(regionId, id1, null, null);
|
|
390
390
|
}
|