Skip to main content
プラグインに戻る
@capgo/capacitor-ibeacon
チュートリアル
@capgo/capacitor-ibeacon

iBeacon

iBeacon plugin for Capacitor - proximity detection and beacon region monitoring

ガイド

iBeaconのチュートリアル

デバイスでテスト

Download the Capgo app, then scan the QR code.

iBeacon プラグイン プレビュー QR code

@capgo/capacitor-ibeacon を使用

Capacitor iBeacon プラグイン - 近接検知とビーコン地域監視

インストール

bun add @capgo/capacitor-ibeacon
bunx cap sync

このプラグインが公開するもの

  • startMonitoringForRegion - ビーコン地域の監視を開始します。エントリ/エクィティ地域のイベントをトリガーします。
  • stopMonitoringForRegion - ビーコン地域の監視を停止します。
  • startRangingBeaconsInRegion - ビーコン地域内でビーコンを範囲検知します。連続的な距離の更新を提供します。
  • stopRangingBeaconsInRegion - ビーコン地域内でビーコンを範囲検知を停止します。

- ビーコン地域の監視を開始します。エントリ/エクィティ地域のイベントをトリガーします。

startMonitoringForRegion

範囲検知の例

import { CapacitorIbeacon } from '@capgo/capacitor-ibeacon';

await CapacitorIbeacon.startMonitoringForRegion({
  identifier: 'MyBeaconRegion',
  uuid: 'B9407F30-F5F8-466E-AFF9-25556B57FE6D'
});

stopMonitoringForRegion

__CAPGO_KEEP_0__を停止します。

import { CapacitorIbeacon } from '@capgo/capacitor-ibeacon';

await CapacitorIbeacon.stopMonitoringForRegion({
  identifier: 'MyBeaconRegion',
  uuid: 'B9407F30-F5F8-466E-AFF9-25556B57FE6D'
});

startRangingBeaconsInRegion

__CAPGO_KEEP_0__を使用してビーコン領域内でビーコンを探索します。領域内での距離の連続的な更新を提供します。

import { CapacitorIbeacon } from '@capgo/capacitor-ibeacon';

await CapacitorIbeacon.startRangingBeaconsInRegion({
  identifier: 'MyBeaconRegion',
  uuid: 'B9407F30-F5F8-466E-AFF9-25556B57FE6D'
});

stopRangingBeaconsInRegion

__CAPGO_KEEP_0__を使用してビーコン領域内でビーコンを探索を停止します。

import { CapacitorIbeacon } from '@capgo/capacitor-ibeacon';

await CapacitorIbeacon.stopRangingBeaconsInRegion({
  identifier: 'MyBeaconRegion',
  uuid: 'B9407F30-F5F8-466E-AFF9-25556B57FE6D'
});

フルリファレンス

Keep going from Using @capgo/capacitor-ibeacon

あなたが__CAPGO_KEEP_0__-ibeaconを使用している場合 Using @capgo/capacitor-ibeacon __CAPGO_KEEP_0__-ibeaconを使用してネイティブプラグインの作業を計画する場合、__CAPGO_KEEP_0__-ibeaconと接続してください @capgo/capacitor-ibeacon Capacitor-IBeaconの実装詳細については@capgo/capacitor-ibeaconを参照してください。 Getting Started Capacitor-IBeaconの実装詳細についてはGetting Startedを参照してください。 Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, and プラグインの追加または更新 Capacitor-IBeaconの製品ワークフローについてはプラグインの追加または更新を参照してください。