@capgo/capacitor-ibeacon 8.1.34 → 8.1.35
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/android/build.gradle
CHANGED
|
@@ -55,6 +55,7 @@ dependencies {
|
|
|
55
55
|
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
56
56
|
implementation 'org.altbeacon:android-beacon-library:2.21.2'
|
|
57
57
|
testImplementation "junit:junit:$junitVersion"
|
|
58
|
+
testImplementation "org.json:json:20240303"
|
|
58
59
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
59
60
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
60
61
|
}
|
|
@@ -44,7 +44,7 @@ import org.altbeacon.beacon.Settings;
|
|
|
44
44
|
)
|
|
45
45
|
public class CapacitorIbeaconPlugin extends Plugin implements BeaconConsumer {
|
|
46
46
|
|
|
47
|
-
private final String pluginVersion = "8.1.
|
|
47
|
+
private final String pluginVersion = "8.1.35";
|
|
48
48
|
private static final String FOREGROUND_CHANNEL_ID = "beacon_service_channel";
|
|
49
49
|
private static final int FOREGROUND_NOTIFICATION_ID = 456;
|
|
50
50
|
private BeaconManager beaconManager;
|
|
@@ -583,8 +583,8 @@ public class CapacitorIbeaconPlugin extends Plugin implements BeaconConsumer {
|
|
|
583
583
|
|
|
584
584
|
@PluginMethod
|
|
585
585
|
public void setBackgroundScanPeriod(PluginCall call) {
|
|
586
|
-
|
|
587
|
-
|
|
586
|
+
long scanPeriod = longOptionFromCall(call, "scanPeriod", 10000L);
|
|
587
|
+
long betweenScanPeriod = longOptionFromCall(call, "betweenScanPeriod", 15000L);
|
|
588
588
|
|
|
589
589
|
try {
|
|
590
590
|
beaconManager.setBackgroundScanPeriod(scanPeriod);
|
|
@@ -611,6 +611,12 @@ public class CapacitorIbeaconPlugin extends Plugin implements BeaconConsumer {
|
|
|
611
611
|
|
|
612
612
|
// Helper methods
|
|
613
613
|
|
|
614
|
+
// Capacitor's PluginCall.getLong() only reads Java Long values. JS numbers that
|
|
615
|
+
// fit in 32 bits cross the bridge as Integer, so optLong is required.
|
|
616
|
+
static long longOptionFromCall(PluginCall call, String key, long defaultValue) {
|
|
617
|
+
return call.getData().optLong(key, defaultValue);
|
|
618
|
+
}
|
|
619
|
+
|
|
614
620
|
private boolean hasBluetoothPermissions() {
|
|
615
621
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
|
616
622
|
return (
|
|
@@ -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.35"
|
|
8
8
|
public let identifier = "CapacitorIbeaconPlugin"
|
|
9
9
|
public let jsName = "CapacitorIbeacon"
|
|
10
10
|
public let pluginMethods: [CAPPluginMethod] = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-ibeacon",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.35",
|
|
4
4
|
"description": "iBeacon plugin for Capacitor - proximity detection and beacon region monitoring",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"watch": "tsc --watch",
|
|
55
55
|
"prepublishOnly": "bun run build",
|
|
56
56
|
"check:wiring": "node scripts/check-capacitor-plugin-wiring.mjs",
|
|
57
|
+
"check:cap9-deprecated": "node scripts/check-cap9-deprecated.mjs",
|
|
57
58
|
"example:install": "cd example-app && bun install --frozen-lockfile",
|
|
58
59
|
"example:build": "bun run build && cd example-app && bun install --frozen-lockfile && bun run build",
|
|
59
60
|
"changelog:ai": "node scripts/generate-ai-changelog.mjs"
|
|
@@ -67,7 +68,7 @@
|
|
|
67
68
|
"@ionic/eslint-config": "^0.4.0",
|
|
68
69
|
"@ionic/prettier-config": "^4.0.0",
|
|
69
70
|
"@ionic/swiftlint-config": "^2.0.0",
|
|
70
|
-
"@types/node": "^
|
|
71
|
+
"@types/node": "^26.0.0",
|
|
71
72
|
"eslint": "^8.57.1",
|
|
72
73
|
"eslint-plugin-import": "^2.31.0",
|
|
73
74
|
"husky": "^9.1.7",
|
|
@@ -76,7 +77,7 @@
|
|
|
76
77
|
"rimraf": "^6.1.0",
|
|
77
78
|
"rollup": "^4.53.2",
|
|
78
79
|
"swiftlint": "^2.0.0",
|
|
79
|
-
"typescript": "
|
|
80
|
+
"typescript": "~5.9.0",
|
|
80
81
|
"prettier-pretty-check": "^0.2.0"
|
|
81
82
|
},
|
|
82
83
|
"peerDependencies": {
|