spotny-sdk 1.0.35 → 1.0.37

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.
@@ -3,9 +3,8 @@
3
3
  <!-- BLE scanning -->
4
4
  <uses-permission android:name="android.permission.BLUETOOTH" />
5
5
  <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
6
- <!-- Android 12+ -->
7
- <uses-permission android:name="android.permission.BLUETOOTH_SCAN"
8
- android:usesPermissionFlags="neverForLocation" />
6
+ <!-- Android 12+ — no neverForLocation so beacon RSSI data is not filtered -->
7
+ <uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
9
8
  <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
10
9
 
11
10
  <!-- Location is required for beacon scanning on API < 31 -->
@@ -16,16 +15,19 @@
16
15
 
17
16
  <!-- Run foreground service while scanning in background -->
18
17
  <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
19
- <uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
18
+ <!-- Android 14+: BLE scanning foreground service type is connectedDevice, not location -->
19
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE" />
20
20
 
21
21
  <uses-feature android:name="android.hardware.bluetooth_le" android:required="false" />
22
22
 
23
23
  <application>
24
24
  <!-- AltBeacon background scanning service -->
25
+ <!-- Android 14+ requires foregroundServiceType="connectedDevice" for BLE foreground services -->
25
26
  <service android:name="org.altbeacon.beacon.service.BeaconService"
26
27
  android:enabled="true"
27
28
  android:exported="false"
28
- android:isolatedProcess="false" />
29
+ android:isolatedProcess="false"
30
+ android:foregroundServiceType="connectedDevice" />
29
31
  <service android:name="org.altbeacon.beacon.BeaconIntentProcessor"
30
32
  android:exported="false" />
31
33
  </application>
@@ -124,9 +124,8 @@ class SpotnySdkModule(private val reactContext: ReactApplicationContext) :
124
124
  .setContentText("Scanning for nearby beacons…")
125
125
  .build()
126
126
  beaconManager.enableForegroundServiceScanning(notification, 8765)
127
- if (beaconManager.beaconParsers.isEmpty()) {
128
- beaconManager.beaconParsers.add(BeaconParser().setBeaconLayout(IBEACON_LAYOUT))
129
- }
127
+ beaconManager.beaconParsers.clear()
128
+ beaconManager.beaconParsers.add(BeaconParser().setBeaconLayout(IBEACON_LAYOUT))
130
129
  beaconManager.foregroundScanPeriod = 1_100L
131
130
  beaconManager.foregroundBetweenScanPeriod = 0L
132
131
  beaconManager.backgroundScanPeriod = 10_000L
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spotny-sdk",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
4
  "description": "Beacon Scanner",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",