Using @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
ビーコン地域の監視を停止します。
import { CapacitorIbeacon } from '@capgo/capacitor-ibeacon';
await CapacitorIbeacon.stopMonitoringForRegion({
identifier: 'MyBeaconRegion',
uuid: 'B9407F30-F5F8-466E-AFF9-25556B57FE6D'
});
startRangingBeaconsInRegion
ビーコン地域でビーコンの距離を継続的に更新します。
import { CapacitorIbeacon } from '@capgo/capacitor-ibeacon';
await CapacitorIbeacon.startRangingBeaconsInRegion({
identifier: 'MyBeaconRegion',
uuid: 'B9407F30-F5F8-466E-AFF9-25556B57FE6D'
});
stopRangingBeaconsInRegion
ビーコン地域でビーコンの距離を停止します。
import { CapacitorIbeacon } from '@capgo/capacitor-ibeacon';
await CapacitorIbeacon.stopRangingBeaconsInRegion({
identifier: 'MyBeaconRegion',
uuid: 'B9407F30-F5F8-466E-AFF9-25556B57FE6D'
});
フルリファレンス
- GitHub https://github.com/Cap-go/capacitor-ibeacon/
- ドキュメント: /docs/plugins/ibeacon/
capgoの使用を続けてください: @capgo/capacitor-ibeacon
__CAPGO_KEEP_0__を使用している場合 capgo/capacitor-ibeaconを使用 __CAPGO_KEEP_0__を使用してnativeプラグインの作業を計画する場合、@__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-ibeaconを接続してください。 capgo/capacitor-ibeaconを使用 for the implementation detail in @capgo/capacitor-ibeacon, Getting Started for the implementation detail in Getting Started, Capgo プラグイン ディレクトリ for the product workflow in Capgo プラグイン ディレクトリ, Capacitor プラグイン by Capgo for the implementation detail in Capacitor プラグイン by Capgo, and プラグインの追加または更新 for the implementation detail in プラグインの追加または更新。