ガイド
iBeaconチュートリアル
使用中:@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/
Keep going from Using @capgo/capacitor-ibeacon
Capgoを使用している場合 Using @capgo/capacitor-ibeacon CapacitorとCapgoを連携することで、ネイティブプラグインの作業を計画できます。 @capgo/capacitor-ibeacon for the implementation detail in @capgo/capacitor-ibeacon, CapacitorとCapgoの連携については、CapacitorとCapgoのドキュメントを参照してください。 Capgoプラグインディレクトリ 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 __CAPGO_KEEP_0__ プラグイン __CAPGO_KEEP_1__