@capgo/capacitor-ibeacon 8.0.8 → 8.1.0

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.
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ xmlns:tools="http://schemas.android.com/tools">
4
+
5
+ <!-- Location permissions for beacon detection -->
6
+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
7
+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
8
+ <!-- Required for background beacon detection on Android 10+ -->
9
+ <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
10
+
11
+ <!-- Bluetooth permissions for beacon scanning -->
12
+ <uses-permission android:name="android.permission.BLUETOOTH" />
13
+ <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
14
+ <!-- Required for Android 12+ (API 31+) -->
15
+ <uses-permission android:name="android.permission.BLUETOOTH_SCAN"
16
+ android:usesPermissionFlags="neverForLocation"
17
+ tools:targetApi="s" />
18
+ <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
19
+
20
+ <!-- Required for foreground service (background beacon scanning on Android 8+) -->
21
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
22
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION"
23
+ tools:targetApi="upside_down_cake" />
24
+
25
+ <!-- Required for receiving boot completed to restart beacon monitoring -->
26
+ <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
27
+
28
+ </manifest>
@@ -3,16 +3,20 @@ package ee.forgr.plugin.capacitor_ibeacon;
3
3
  import android.Manifest;
4
4
  import android.bluetooth.BluetoothAdapter;
5
5
  import android.content.Context;
6
+ import android.content.Intent;
6
7
  import android.content.ServiceConnection;
7
8
  import android.content.pm.PackageManager;
9
+ import android.os.Build;
8
10
  import androidx.core.app.ActivityCompat;
9
11
  import com.getcapacitor.JSArray;
10
12
  import com.getcapacitor.JSObject;
13
+ import com.getcapacitor.PermissionState;
11
14
  import com.getcapacitor.Plugin;
12
15
  import com.getcapacitor.PluginCall;
13
16
  import com.getcapacitor.PluginMethod;
14
17
  import com.getcapacitor.annotation.CapacitorPlugin;
15
18
  import com.getcapacitor.annotation.Permission;
19
+ import com.getcapacitor.annotation.PermissionCallback;
16
20
  import java.util.ArrayList;
17
21
  import java.util.Collection;
18
22
  import java.util.HashMap;
@@ -31,12 +35,15 @@ import org.altbeacon.beacon.Region;
31
35
  name = "CapacitorIbeacon",
32
36
  permissions = {
33
37
  @Permission(alias = "location", strings = { Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION }),
34
- @Permission(alias = "bluetooth", strings = { Manifest.permission.BLUETOOTH, Manifest.permission.BLUETOOTH_ADMIN })
38
+ @Permission(alias = "backgroundLocation", strings = { Manifest.permission.ACCESS_BACKGROUND_LOCATION }),
39
+ @Permission(alias = "bluetooth", strings = { Manifest.permission.BLUETOOTH, Manifest.permission.BLUETOOTH_ADMIN }),
40
+ @Permission(alias = "bluetoothScan", strings = { Manifest.permission.BLUETOOTH_SCAN }),
41
+ @Permission(alias = "bluetoothConnect", strings = { Manifest.permission.BLUETOOTH_CONNECT })
35
42
  }
36
43
  )
37
44
  public class CapacitorIbeaconPlugin extends Plugin implements BeaconConsumer {
38
45
 
39
- private final String pluginVersion = "8.0.8";
46
+ private final String pluginVersion = "8.1.0";
40
47
  private BeaconManager beaconManager;
41
48
  private Map<String, Region> monitoredRegions = new HashMap<>();
42
49
  private Map<String, Region> rangedRegions = new HashMap<>();
@@ -50,6 +57,20 @@ public class CapacitorIbeaconPlugin extends Plugin implements BeaconConsumer {
50
57
  // Set up iBeacon layout parser
51
58
  beaconManager.getBeaconParsers().add(new BeaconParser().setBeaconLayout("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24"));
52
59
 
60
+ // Configure for background scanning - enable long-running scanning mode
61
+ // This is critical for beacon detection when app is in background
62
+ beaconManager.setEnableScheduledScanJobs(false);
63
+
64
+ // Configure background scan periods (in milliseconds)
65
+ // Default background scan: 10 seconds scan, 5 minutes between scans
66
+ // We use more aggressive settings for better detection
67
+ beaconManager.setBackgroundBetweenScanPeriod(15000L); // 15 seconds between scans
68
+ beaconManager.setBackgroundScanPeriod(10000L); // 10 seconds scan duration
69
+
70
+ // Configure foreground scan periods
71
+ beaconManager.setForegroundBetweenScanPeriod(0L); // Continuous scanning in foreground
72
+ beaconManager.setForegroundScanPeriod(1100L); // Standard scan period
73
+
53
74
  // Bind to beacon service
54
75
  beaconManager.bind(this);
55
76
 
@@ -212,6 +233,24 @@ public class CapacitorIbeaconPlugin extends Plugin implements BeaconConsumer {
212
233
 
213
234
  @PluginMethod
214
235
  public void requestWhenInUseAuthorization(PluginCall call) {
236
+ // On Android 12+, also need to request BLUETOOTH_SCAN and BLUETOOTH_CONNECT
237
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
238
+ boolean hasBluetoothScan =
239
+ ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.BLUETOOTH_SCAN) == PackageManager.PERMISSION_GRANTED;
240
+ boolean hasBluetoothConnect =
241
+ ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.BLUETOOTH_CONNECT) ==
242
+ PackageManager.PERMISSION_GRANTED;
243
+
244
+ if (!hasBluetoothScan) {
245
+ requestPermissionForAlias("bluetoothScan", call, "bluetoothScanPermissionCallback");
246
+ return;
247
+ }
248
+ if (!hasBluetoothConnect) {
249
+ requestPermissionForAlias("bluetoothConnect", call, "bluetoothConnectPermissionCallback");
250
+ return;
251
+ }
252
+ }
253
+
215
254
  if (
216
255
  ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED
217
256
  ) {
@@ -225,15 +264,55 @@ public class CapacitorIbeaconPlugin extends Plugin implements BeaconConsumer {
225
264
 
226
265
  @PluginMethod
227
266
  public void requestAlwaysAuthorization(PluginCall call) {
228
- requestWhenInUseAuthorization(call);
267
+ // First ensure we have foreground location permission
268
+ boolean hasFineLocation =
269
+ ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED;
270
+
271
+ if (!hasFineLocation) {
272
+ // Must request foreground location first before background
273
+ requestPermissionForAlias("location", call, "foregroundLocationForBackgroundCallback");
274
+ return;
275
+ }
276
+
277
+ // On Android 10+ (Q), need to request ACCESS_BACKGROUND_LOCATION separately
278
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
279
+ boolean hasBackgroundLocation =
280
+ ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_BACKGROUND_LOCATION) ==
281
+ PackageManager.PERMISSION_GRANTED;
282
+
283
+ if (!hasBackgroundLocation) {
284
+ requestPermissionForAlias("backgroundLocation", call, "backgroundLocationPermissionCallback");
285
+ return;
286
+ }
287
+ }
288
+
289
+ // On Android 12+, also need BLUETOOTH_SCAN and BLUETOOTH_CONNECT
290
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
291
+ boolean hasBluetoothScan =
292
+ ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.BLUETOOTH_SCAN) == PackageManager.PERMISSION_GRANTED;
293
+ boolean hasBluetoothConnect =
294
+ ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.BLUETOOTH_CONNECT) ==
295
+ PackageManager.PERMISSION_GRANTED;
296
+
297
+ if (!hasBluetoothScan) {
298
+ requestPermissionForAlias("bluetoothScan", call, "bluetoothScanForBackgroundCallback");
299
+ return;
300
+ }
301
+ if (!hasBluetoothConnect) {
302
+ requestPermissionForAlias("bluetoothConnect", call, "bluetoothConnectForBackgroundCallback");
303
+ return;
304
+ }
305
+ }
306
+
307
+ JSObject ret = new JSObject();
308
+ ret.put("status", "authorized_always");
309
+ call.resolve(ret);
229
310
  }
230
311
 
231
- @PluginMethod
232
- public void getAuthorizationStatus(PluginCall call) {
312
+ @PermissionCallback
313
+ private void locationPermissionCallback(PluginCall call) {
233
314
  JSObject ret = new JSObject();
234
- if (
235
- ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED
236
- ) {
315
+ if (getPermissionState("location") == PermissionState.GRANTED) {
237
316
  ret.put("status", "authorized_when_in_use");
238
317
  } else {
239
318
  ret.put("status", "denied");
@@ -241,6 +320,94 @@ public class CapacitorIbeaconPlugin extends Plugin implements BeaconConsumer {
241
320
  call.resolve(ret);
242
321
  }
243
322
 
323
+ @PluginMethod
324
+ public void getAuthorizationStatus(PluginCall call) {
325
+ JSObject ret = new JSObject();
326
+
327
+ boolean hasFineLocation =
328
+ ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED;
329
+
330
+ if (!hasFineLocation) {
331
+ ret.put("status", "denied");
332
+ call.resolve(ret);
333
+ return;
334
+ }
335
+
336
+ // On Android 10+, check for background location
337
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
338
+ boolean hasBackgroundLocation =
339
+ ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_BACKGROUND_LOCATION) ==
340
+ PackageManager.PERMISSION_GRANTED;
341
+
342
+ if (hasBackgroundLocation) {
343
+ ret.put("status", "authorized_always");
344
+ } else {
345
+ ret.put("status", "authorized_when_in_use");
346
+ }
347
+ } else {
348
+ // Below Android 10, foreground permission is enough for background
349
+ ret.put("status", "authorized_always");
350
+ }
351
+
352
+ call.resolve(ret);
353
+ }
354
+
355
+ @PermissionCallback
356
+ private void foregroundLocationForBackgroundCallback(PluginCall call) {
357
+ if (getPermissionState("location") == PermissionState.GRANTED) {
358
+ // Now request background location
359
+ requestAlwaysAuthorization(call);
360
+ } else {
361
+ JSObject ret = new JSObject();
362
+ ret.put("status", "denied");
363
+ call.resolve(ret);
364
+ }
365
+ }
366
+
367
+ @PermissionCallback
368
+ private void backgroundLocationPermissionCallback(PluginCall call) {
369
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
370
+ boolean hasBackgroundLocation =
371
+ ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_BACKGROUND_LOCATION) ==
372
+ PackageManager.PERMISSION_GRANTED;
373
+
374
+ if (hasBackgroundLocation) {
375
+ // Continue with bluetooth permissions on Android 12+
376
+ requestAlwaysAuthorization(call);
377
+ } else {
378
+ JSObject ret = new JSObject();
379
+ ret.put("status", "authorized_when_in_use");
380
+ call.resolve(ret);
381
+ }
382
+ } else {
383
+ requestAlwaysAuthorization(call);
384
+ }
385
+ }
386
+
387
+ @PermissionCallback
388
+ private void bluetoothScanPermissionCallback(PluginCall call) {
389
+ // Continue with the original request
390
+ requestWhenInUseAuthorization(call);
391
+ }
392
+
393
+ @PermissionCallback
394
+ private void bluetoothConnectPermissionCallback(PluginCall call) {
395
+ // Continue with the original request
396
+ requestWhenInUseAuthorization(call);
397
+ }
398
+
399
+ @PermissionCallback
400
+ private void bluetoothScanForBackgroundCallback(PluginCall call) {
401
+ // Continue with the background authorization flow
402
+ requestAlwaysAuthorization(call);
403
+ }
404
+
405
+ @PermissionCallback
406
+ private void bluetoothConnectForBackgroundCallback(PluginCall call) {
407
+ // Continue with the background authorization flow
408
+ requestAlwaysAuthorization(call);
409
+ }
410
+
244
411
  @PluginMethod
245
412
  public void isBluetoothEnabled(PluginCall call) {
246
413
  JSObject ret = new JSObject();
@@ -272,6 +439,68 @@ public class CapacitorIbeaconPlugin extends Plugin implements BeaconConsumer {
272
439
  call.resolve();
273
440
  }
274
441
 
442
+ @PluginMethod
443
+ public void enableBackgroundMode(PluginCall call) {
444
+ Boolean enabled = call.getBoolean("enabled", true);
445
+ try {
446
+ if (enabled != null && enabled) {
447
+ // Enable foreground service for background beacon scanning
448
+ // This is required on Android 8+ for reliable background operation
449
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
450
+ // Create notification channel for foreground service
451
+ android.app.NotificationChannel channel = new android.app.NotificationChannel(
452
+ "beacon_service_channel",
453
+ "Beacon Service",
454
+ android.app.NotificationManager.IMPORTANCE_LOW
455
+ );
456
+ channel.setDescription("Background beacon monitoring service");
457
+
458
+ android.app.NotificationManager notificationManager = getContext().getSystemService(
459
+ android.app.NotificationManager.class
460
+ );
461
+ if (notificationManager != null) {
462
+ notificationManager.createNotificationChannel(channel);
463
+ }
464
+
465
+ // Build notification for foreground service
466
+ android.app.Notification.Builder builder = new android.app.Notification.Builder(getContext(), "beacon_service_channel");
467
+ builder.setSmallIcon(android.R.drawable.ic_dialog_info);
468
+ builder.setContentTitle("Beacon Monitoring");
469
+ builder.setContentText("Scanning for nearby beacons");
470
+
471
+ // Enable foreground service mode in AltBeacon
472
+ beaconManager.enableForegroundServiceScanning(builder.build(), 456);
473
+ }
474
+
475
+ // Set background mode
476
+ beaconManager.setBackgroundMode(true);
477
+ } else {
478
+ // Disable background mode
479
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
480
+ beaconManager.disableForegroundServiceScanning();
481
+ }
482
+ beaconManager.setBackgroundMode(false);
483
+ }
484
+ call.resolve();
485
+ } catch (Exception e) {
486
+ call.reject("Failed to enable background mode", e);
487
+ }
488
+ }
489
+
490
+ @PluginMethod
491
+ public void setBackgroundScanPeriod(PluginCall call) {
492
+ Long scanPeriod = call.getLong("scanPeriod", 10000L);
493
+ Long betweenScanPeriod = call.getLong("betweenScanPeriod", 15000L);
494
+
495
+ try {
496
+ beaconManager.setBackgroundScanPeriod(scanPeriod);
497
+ beaconManager.setBackgroundBetweenScanPeriod(betweenScanPeriod);
498
+ call.resolve();
499
+ } catch (Exception e) {
500
+ call.reject("Failed to set background scan period", e);
501
+ }
502
+ }
503
+
275
504
  @PluginMethod
276
505
  public void getPluginVersion(final PluginCall call) {
277
506
  try {
package/dist/docs.json CHANGED
@@ -442,6 +442,90 @@
442
442
  "docs": "Get the native Capacitor plugin version.",
443
443
  "complexTypes": [],
444
444
  "slug": "getpluginversion"
445
+ },
446
+ {
447
+ "name": "enableBackgroundMode",
448
+ "signature": "(options: { enabled: boolean; }) => Promise<void>",
449
+ "parameters": [
450
+ {
451
+ "name": "options",
452
+ "docs": "- Background mode configuration",
453
+ "type": "{ enabled: boolean; }"
454
+ }
455
+ ],
456
+ "returns": "Promise<void>",
457
+ "tags": [
458
+ {
459
+ "name": "param",
460
+ "text": "options - Background mode configuration"
461
+ },
462
+ {
463
+ "name": "returns",
464
+ "text": "Promise that resolves when background mode is configured"
465
+ },
466
+ {
467
+ "name": "throws",
468
+ "text": "Error if configuration fails"
469
+ },
470
+ {
471
+ "name": "since",
472
+ "text": "8.0.9"
473
+ },
474
+ {
475
+ "name": "platform",
476
+ "text": "Android"
477
+ },
478
+ {
479
+ "name": "example",
480
+ "text": "```typescript\n// Enable background mode for beacon scanning\nawait CapacitorIbeacon.enableBackgroundMode({ enabled: true });\n\n// Disable background mode\nawait CapacitorIbeacon.enableBackgroundMode({ enabled: false });\n```"
481
+ }
482
+ ],
483
+ "docs": "Enable or disable background beacon scanning mode (Android only).\nThis enables a foreground service for reliable background beacon detection.\nMust be called after requesting \"Always\" location authorization.",
484
+ "complexTypes": [],
485
+ "slug": "enablebackgroundmode"
486
+ },
487
+ {
488
+ "name": "setBackgroundScanPeriod",
489
+ "signature": "(options: BackgroundScanPeriodOptions) => Promise<void>",
490
+ "parameters": [
491
+ {
492
+ "name": "options",
493
+ "docs": "- Scan period configuration in milliseconds",
494
+ "type": "BackgroundScanPeriodOptions"
495
+ }
496
+ ],
497
+ "returns": "Promise<void>",
498
+ "tags": [
499
+ {
500
+ "name": "param",
501
+ "text": "options - Scan period configuration in milliseconds"
502
+ },
503
+ {
504
+ "name": "returns",
505
+ "text": "Promise that resolves when scan periods are configured"
506
+ },
507
+ {
508
+ "name": "throws",
509
+ "text": "Error if configuration fails"
510
+ },
511
+ {
512
+ "name": "since",
513
+ "text": "8.0.9"
514
+ },
515
+ {
516
+ "name": "platform",
517
+ "text": "Android"
518
+ },
519
+ {
520
+ "name": "example",
521
+ "text": "```typescript\n// Set background scan to 10 seconds every 30 seconds\nawait CapacitorIbeacon.setBackgroundScanPeriod({\n scanPeriod: 10000, // 10 seconds of scanning\n betweenScanPeriod: 30000 // 30 seconds between scans\n});\n```"
522
+ }
523
+ ],
524
+ "docs": "Configure background scan periods (Android only).\nControls how often and how long the device scans for beacons when in background.",
525
+ "complexTypes": [
526
+ "BackgroundScanPeriodOptions"
527
+ ],
528
+ "slug": "setbackgroundscanperiod"
445
529
  }
446
530
  ],
447
531
  "properties": []
@@ -534,6 +618,29 @@
534
618
  "type": "number | undefined"
535
619
  }
536
620
  ]
621
+ },
622
+ {
623
+ "name": "BackgroundScanPeriodOptions",
624
+ "slug": "backgroundscanperiodoptions",
625
+ "docs": "Background scan period configuration options (Android only).",
626
+ "tags": [],
627
+ "methods": [],
628
+ "properties": [
629
+ {
630
+ "name": "scanPeriod",
631
+ "tags": [],
632
+ "docs": "Duration of each scan period in milliseconds.\nDefault: 10000 (10 seconds)",
633
+ "complexTypes": [],
634
+ "type": "number | undefined"
635
+ },
636
+ {
637
+ "name": "betweenScanPeriod",
638
+ "tags": [],
639
+ "docs": "Duration between scan periods in milliseconds.\nDefault: 15000 (15 seconds)",
640
+ "complexTypes": [],
641
+ "type": "number | undefined"
642
+ }
643
+ ]
537
644
  }
538
645
  ],
539
646
  "enums": [],
@@ -212,6 +212,47 @@ export interface CapacitorIbeaconPlugin {
212
212
  getPluginVersion(): Promise<{
213
213
  version: string;
214
214
  }>;
215
+ /**
216
+ * Enable or disable background beacon scanning mode (Android only).
217
+ * This enables a foreground service for reliable background beacon detection.
218
+ * Must be called after requesting "Always" location authorization.
219
+ *
220
+ * @param options - Background mode configuration
221
+ * @returns Promise that resolves when background mode is configured
222
+ * @throws Error if configuration fails
223
+ * @since 8.0.9
224
+ * @platform Android
225
+ * @example
226
+ * ```typescript
227
+ * // Enable background mode for beacon scanning
228
+ * await CapacitorIbeacon.enableBackgroundMode({ enabled: true });
229
+ *
230
+ * // Disable background mode
231
+ * await CapacitorIbeacon.enableBackgroundMode({ enabled: false });
232
+ * ```
233
+ */
234
+ enableBackgroundMode(options: {
235
+ enabled: boolean;
236
+ }): Promise<void>;
237
+ /**
238
+ * Configure background scan periods (Android only).
239
+ * Controls how often and how long the device scans for beacons when in background.
240
+ *
241
+ * @param options - Scan period configuration in milliseconds
242
+ * @returns Promise that resolves when scan periods are configured
243
+ * @throws Error if configuration fails
244
+ * @since 8.0.9
245
+ * @platform Android
246
+ * @example
247
+ * ```typescript
248
+ * // Set background scan to 10 seconds every 30 seconds
249
+ * await CapacitorIbeacon.setBackgroundScanPeriod({
250
+ * scanPeriod: 10000, // 10 seconds of scanning
251
+ * betweenScanPeriod: 30000 // 30 seconds between scans
252
+ * });
253
+ * ```
254
+ */
255
+ setBackgroundScanPeriod(options: BackgroundScanPeriodOptions): Promise<void>;
215
256
  }
216
257
  /**
217
258
  * Beacon region definition for monitoring and ranging.
@@ -238,6 +279,21 @@ export interface BeaconRegion {
238
279
  */
239
280
  notifyEntryStateOnDisplay?: boolean;
240
281
  }
282
+ /**
283
+ * Background scan period configuration options (Android only).
284
+ */
285
+ export interface BackgroundScanPeriodOptions {
286
+ /**
287
+ * Duration of each scan period in milliseconds.
288
+ * Default: 10000 (10 seconds)
289
+ */
290
+ scanPeriod?: number;
291
+ /**
292
+ * Duration between scan periods in milliseconds.
293
+ * Default: 15000 (15 seconds)
294
+ */
295
+ betweenScanPeriod?: number;
296
+ }
241
297
  /**
242
298
  * Beacon advertising options for transmitting as an iBeacon (iOS only).
243
299
  */
package/dist/esm/web.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { WebPlugin } from '@capacitor/core';
2
- import type { CapacitorIbeaconPlugin, BeaconRegion, BeaconAdvertisingOptions } from './definitions';
2
+ import type { CapacitorIbeaconPlugin, BeaconRegion, BeaconAdvertisingOptions, BackgroundScanPeriodOptions } from './definitions';
3
3
  export declare class CapacitorIbeaconWeb extends WebPlugin implements CapacitorIbeaconPlugin {
4
4
  startMonitoringForRegion(_options: BeaconRegion): Promise<void>;
5
5
  stopMonitoringForRegion(_options: BeaconRegion): Promise<void>;
@@ -28,4 +28,8 @@ export declare class CapacitorIbeaconWeb extends WebPlugin implements CapacitorI
28
28
  getPluginVersion(): Promise<{
29
29
  version: string;
30
30
  }>;
31
+ enableBackgroundMode(_options: {
32
+ enabled: boolean;
33
+ }): Promise<void>;
34
+ setBackgroundScanPeriod(_options: BackgroundScanPeriodOptions): Promise<void>;
31
35
  }
package/dist/esm/web.js CHANGED
@@ -45,5 +45,13 @@ export class CapacitorIbeaconWeb extends WebPlugin {
45
45
  async getPluginVersion() {
46
46
  return { version: 'web' };
47
47
  }
48
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
49
+ enableBackgroundMode(_options) {
50
+ throw new Error('Method not implemented on web platform.');
51
+ }
52
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
53
+ setBackgroundScanPeriod(_options) {
54
+ throw new Error('Method not implemented on web platform.');
55
+ }
48
56
  }
49
57
  //# sourceMappingURL=web.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,mBAAoB,SAAQ,SAAS;IAChD,6DAA6D;IAC7D,wBAAwB,CAAC,QAAsB;QAC7C,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC7D,CAAC;IAED,6DAA6D;IAC7D,uBAAuB,CAAC,QAAsB;QAC5C,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC7D,CAAC;IAED,6DAA6D;IAC7D,2BAA2B,CAAC,QAAsB;QAChD,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC7D,CAAC;IAED,6DAA6D;IAC7D,0BA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C5B,CAAC;IAED,6DAA6D;IAC7D,oBAAoB,CAAC,QAA8B;QACjD,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC7D,CAAC;IAED,6DAA6D;IAC7D,uBAAuB,CAAC,QAAqC;QAC3D,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC7D,CAAC;CACF"}
@@ -52,6 +52,14 @@ class CapacitorIbeaconWeb extends core.WebPlugin {
52
52
  async getPluginVersion() {
53
53
  return { version: 'web' };
54
54
  }
55
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
56
+ enableBackgroundMode(_options) {
57
+ throw new Error('Method not implemented on web platform.');
58
+ }
59
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
60
+ setBackgroundScanPeriod(_options) {
61
+ throw new Error('Method not implemented on web platform.');
62
+ }
55
63
  }
56
64
 
57
65
  var web = /*#__PURE__*/Object.freeze({
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorIbeacon = registerPlugin('CapacitorIbeacon', {\n web: () => import('./web').then((m) => new m.CapacitorIbeaconWeb()),\n});\nexport * from './definitions';\nexport { CapacitorIbeacon };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorIbeaconWeb extends WebPlugin {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n startMonitoringForRegion(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n stopMonitoringForRegion(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n startRangingBeaconsInRegion(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n stopRangingBeaconsInRegion(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n startAdvertising(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n stopAdvertising() {\n throw new Error('Method not implemented on web platform.');\n }\n requestWhenInUseAuthorization() {\n return Promise.resolve({ status: 'denied' });\n }\n requestAlwaysAuthorization() {\n return Promise.resolve({ status: 'denied' });\n }\n getAuthorizationStatus() {\n return Promise.resolve({ status: 'not_determined' });\n }\n isBluetoothEnabled() {\n return Promise.resolve({ enabled: false });\n }\n isRangingAvailable() {\n return Promise.resolve({ available: false });\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n enableARMAFilter(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n async getPluginVersion() {\n return { version: 'web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,gBAAgB,GAAGA,mBAAc,CAAC,kBAAkB,EAAE;AAC5D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;AACvE,CAAC;;ACFM,MAAM,mBAAmB,SAASC,cAAS,CAAC;AACnD;AACA,IAAI,wBAAwB,CAAC,QAAQ,EAAE;AACvC,QAAQ,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC;AAClE,IAAI;AACJ;AACA,IAAI,uBAAuB,CAAC,QAAQ,EAAE;AACtC,QAAQ,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC;AAClE,IAAI;AACJ;AACA,IAAI,2BAA2B,CAAC,QAAQ,EAAE;AAC1C,QAAQ,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC;AAClE,IAAI;AACJ;AACA,IAAI,0BAA0B,CAAC,QAAQ,EAAE;AACzC,QAAQ,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC;AAClE,IAAI;AACJ;AACA,IAAI,gBAAgB,CAAC,QAAQ,EAAE;AAC/B,QAAQ,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC;AAClE,IAAI;AACJ,IAAI,eAAe,GAAG;AACtB,QAAQ,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC;AAClE,IAAI;AACJ,IAAI,6BAA6B,GAAG;AACpC,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AACpD,IAAI;AACJ,IAAI,0BAA0B,GAAG;AACjC,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AACpD,IAAI;AACJ,IAAI,sBAAsB,GAAG;AAC7B,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC;AAC5D,IAAI;AACJ,IAAI,kBAAkB,GAAG;AACzB,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AAClD,IAAI;AACJ,IAAI,kBAAkB,GAAG;AACzB,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;AACpD,IAAI;AACJ;AACA,IAAI,gBAAgB,CAAC,QAAQ,EAAE;AAC/B,QAAQ,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC;AAClE,IAAI;AACJ,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;AACjC,IAAI;AACJ;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorIbeacon = registerPlugin('CapacitorIbeacon', {\n web: () => import('./web').then((m) => new m.CapacitorIbeaconWeb()),\n});\nexport * from './definitions';\nexport { CapacitorIbeacon };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorIbeaconWeb extends WebPlugin {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n startMonitoringForRegion(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n stopMonitoringForRegion(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n startRangingBeaconsInRegion(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n stopRangingBeaconsInRegion(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n startAdvertising(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n stopAdvertising() {\n throw new Error('Method not implemented on web platform.');\n }\n requestWhenInUseAuthorization() {\n return Promise.resolve({ status: 'denied' });\n }\n requestAlwaysAuthorization() {\n return Promise.resolve({ status: 'denied' });\n }\n getAuthorizationStatus() {\n return Promise.resolve({ status: 'not_determined' });\n }\n isBluetoothEnabled() {\n return Promise.resolve({ enabled: false });\n }\n isRangingAvailable() {\n return Promise.resolve({ available: false });\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n enableARMAFilter(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n async getPluginVersion() {\n return { version: 'web' };\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n enableBackgroundMode(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n setBackgroundScanPeriod(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,gBAAgB,GAAGA,mBAAc,CAAC,kBAAkB,EAAE;AAC5D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;AACvE,CAAC;;ACFM,MAAM,mBAAmB,SAASC,cAAS,CAAC;AACnD;AACA,IA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gBAAgB,CAAC,QAAQ,EAAE;AAC/B,QAAQ,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC;AAClE,IAAI;AACJ,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;AACjC,IAAI;AACJ;AACA,IAAI,oBAAoB,CAAC,QAAQ,EAAE;AACnC,QAAQ,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC;AAClE,IAAI;AACJ;AACA,IAAI,uBAAuB,CAAC,QAAQ,EAAE;AACtC,QAAQ,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC;AAClE,IAAI;AACJ;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -51,6 +51,14 @@ var capacitorCapacitorIbeacon = (function (exports, core) {
51
51
  async getPluginVersion() {
52
52
  return { version: 'web' };
53
53
  }
54
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
55
+ enableBackgroundMode(_options) {
56
+ throw new Error('Method not implemented on web platform.');
57
+ }
58
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
59
+ setBackgroundScanPeriod(_options) {
60
+ throw new Error('Method not implemented on web platform.');
61
+ }
54
62
  }
55
63
 
56
64
  var web = /*#__PURE__*/Object.freeze({
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorIbeacon = registerPlugin('CapacitorIbeacon', {\n web: () => import('./web').then((m) => new m.CapacitorIbeaconWeb()),\n});\nexport * from './definitions';\nexport { CapacitorIbeacon };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorIbeaconWeb extends WebPlugin {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n startMonitoringForRegion(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n stopMonitoringForRegion(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n startRangingBeaconsInRegion(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n stopRangingBeaconsInRegion(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n startAdvertising(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n stopAdvertising() {\n throw new Error('Method not implemented on web platform.');\n }\n requestWhenInUseAuthorization() {\n return Promise.resolve({ status: 'denied' });\n }\n requestAlwaysAuthorization() {\n return Promise.resolve({ status: 'denied' });\n }\n getAuthorizationStatus() {\n return Promise.resolve({ status: 'not_determined' });\n }\n isBluetoothEnabled() {\n return Promise.resolve({ enabled: false });\n }\n isRangingAvailable() {\n return Promise.resolve({ available: false });\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n enableARMAFilter(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n async getPluginVersion() {\n return { version: 'web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,gBAAgB,GAAGA,mBAAc,CAAC,kBAAkB,EAAE;IAC5D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;IACvE,CAAC;;ICFM,MAAM,mBAAmB,SAASC,cAAS,CAAC;IACnD;IACA,IAAI,wBAAwB,CAAC,QAAQ,EAAE;IACvC,QAAQ,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC;IAClE,IAAI;IACJ;IACA,IAAI,uBAAuB,CAAC,QAAQ,EAAE;IACtC,QAAQ,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC;IAClE,IAAI;IACJ;IACA,IAAI,2BAA2B,CAAC,QAAQ,EAAE;IAC1C,QAAQ,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC;IAClE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Ibeacon = registerPlugin('CapacitorIbeacon', {\n web: () => import('./web').then((m) => new m.CapacitorIbeaconWeb()),\n});\nexport * from './definitions';\nexport { CapacitorIbeacon };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorIbeaconWeb extends WebPlugin {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n startMonitoringForRegion(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n stopMonitoringForRegion(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n startRangingBeaconsInRegion(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n stopRangingBeaconsInRegion(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n startAdvertising(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n stopAdvertising() {\n throw new Error('Method not implemented on web platform.');\n }\n requestWhenInUseAuthorization() {\n return Promise.resolve({ status: 'denied' });\n }\n requestAlwaysAuthorization() {\n return Promise.resolve({ status: 'denied' });\n }\n getAuthorizationStatus() {\n return Promise.resolve({ status: 'not_determined' });\n }\n isBluetoothEnabled() {\n return Promise.resolve({ enabled: false });\n }\n isRangingAvailable() {\n return Promise.resolve({ available: false });\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n enableARMAFilter(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n async getPluginVersion() {\n return { version: 'web' };\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n enableBackgroundMode(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n setBackgroundScanPeriod(_options) {\n throw new Error('Method not implemented on web platform.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,gBAAgB,GAAGA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OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAClD,IAAI;IACJ,IAAI,kBAAkB,GAAG;IACzB,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IACpD,IAAI;IACJ;IACA,IAAI,gBAAgB,CAAC,QAAQ,EAAE;IAC/B,QAAQ,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC;IAClE,IAAI;IACJ,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;IACjC,IAAI;IACJ;IACA,IAAI,oBAAoB,CAAC,QAAQ,EAAE;IACnC,QAAQ,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC;IAClE,IAAI;IACJ;IACA,IAAI,uBAAuB,CAAC,QAAQ,EAAE;IACtC,QAAQ,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC;IAClE,IAAI;IACJ;;;;;;;;;;;;;;;"}
@@ -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.0.8"
7
+ private let pluginVersion: String = "8.1.0"
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.0.8",
3
+ "version": "8.1.0",
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",