@capgo/capacitor-ibeacon 8.1.8 → 8.1.9
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/README.md
CHANGED
|
@@ -54,32 +54,18 @@ Add the following to your `Info.plist`:
|
|
|
54
54
|
|
|
55
55
|
### Android
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
The plugin automatically includes all required permissions and dependencies. No manual configuration needed.
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
<uses-permission android:name="android.permission.BLUETOOTH" />
|
|
66
|
-
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
|
67
|
-
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
|
|
68
|
-
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
|
69
|
-
|
|
70
|
-
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
|
71
|
-
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
|
|
72
|
-
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
|
73
|
-
</manifest>
|
|
74
|
-
```
|
|
59
|
+
**Permissions included:**
|
|
60
|
+
- Location permissions (fine, coarse, background)
|
|
61
|
+
- Bluetooth permissions (with proper legacy support for Android ≤11 and modern permissions for Android 12+)
|
|
62
|
+
- Foreground service permissions for background beacon scanning
|
|
63
|
+
- Boot completed permission for persistent monitoring
|
|
75
64
|
|
|
76
|
-
|
|
65
|
+
**Dependencies included:**
|
|
66
|
+
- AltBeacon Android Beacon Library (2.21.2)
|
|
77
67
|
|
|
78
|
-
|
|
79
|
-
dependencies {
|
|
80
|
-
implementation 'org.altbeacon:android-beacon-library:2.21.2'
|
|
81
|
-
}
|
|
82
|
-
```
|
|
68
|
+
**Important:** You still need to request permissions at runtime using the plugin's authorization methods (see API section below).
|
|
83
69
|
|
|
84
70
|
## API
|
|
85
71
|
|
|
@@ -9,11 +9,14 @@
|
|
|
9
9
|
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
|
|
10
10
|
|
|
11
11
|
<!-- Bluetooth permissions for beacon scanning -->
|
|
12
|
-
|
|
13
|
-
<uses-permission android:name="android.permission.
|
|
12
|
+
<!-- Legacy permissions for Android 11 and below (API 30-) -->
|
|
13
|
+
<uses-permission android:name="android.permission.BLUETOOTH"
|
|
14
|
+
android:maxSdkVersion="30" />
|
|
15
|
+
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"
|
|
16
|
+
android:maxSdkVersion="30" />
|
|
14
17
|
<!-- Required for Android 12+ (API 31+) -->
|
|
18
|
+
<!-- Note: We DO use Bluetooth for location purposes (iBeacon proximity detection) -->
|
|
15
19
|
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"
|
|
16
|
-
android:usesPermissionFlags="neverForLocation"
|
|
17
20
|
tools:targetApi="s" />
|
|
18
21
|
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
|
19
22
|
|
|
@@ -43,7 +43,7 @@ import org.altbeacon.beacon.Region;
|
|
|
43
43
|
)
|
|
44
44
|
public class CapacitorIbeaconPlugin extends Plugin implements BeaconConsumer {
|
|
45
45
|
|
|
46
|
-
private final String pluginVersion = "8.1.
|
|
46
|
+
private final String pluginVersion = "8.1.9";
|
|
47
47
|
private static final String FOREGROUND_CHANNEL_ID = "beacon_service_channel";
|
|
48
48
|
private static final int FOREGROUND_NOTIFICATION_ID = 456;
|
|
49
49
|
private BeaconManager beaconManager;
|
|
@@ -4,7 +4,7 @@ import CoreLocation
|
|
|
4
4
|
|
|
5
5
|
@objc(CapacitorIbeaconPlugin)
|
|
6
6
|
public class CapacitorIbeaconPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
7
|
-
private let pluginVersion: String = "8.1.
|
|
7
|
+
private let pluginVersion: String = "8.1.9"
|
|
8
8
|
public let identifier = "CapacitorIbeaconPlugin"
|
|
9
9
|
public let jsName = "CapacitorIbeacon"
|
|
10
10
|
public let pluginMethods: [CAPPluginMethod] = [
|
package/package.json
CHANGED