メインコンテンツにジャンプ

@capgo/capacitor-低消費電力Bluetooth

Capacitor 低消費電力Bluetoothプラグイン

CapacitorのBluetooth Low Energy プラグインはBLE通信に使用されます。

  • initialize - BLE プラグインを初期化する必要があります。どのメソッドよりも前に呼び出す必要があります。
  • shimWebBluetooth - Capacitor Web Bluetooth シムをインストールする。 navigator.bluetooth. Call this manually before using the Web Bluetooth API from a Capacitor native app.
  • isAvailable - __CAPGO_KEEP_0__ Web Bluetooth シムをインストールする。
  • isEnabled - __CAPGO_KEEP_0__ が利用可能かどうかを確認する。

- API が有効かどうかを確認する。

Section titled “Public API”
- 公開 API- メソッド
initialize- 説明
shimWebBluetoothInstall the Capacitor Web Bluetooth shim on navigator.bluetooth. Call this manually before using the Web Bluetooth API from a Capacitor native app.
isAvailableBluetoothが利用可能かどうかを確認します。
isEnabledBluetoothが有効かどうかを確認します。
isLocationEnabled位置情報サービスが有効かどうかを確認します (Androidのみ)。
openAppSettingsアプリの設定画面を開きます。
openBluetoothSettingsBluetoothの設定画面を開きます (Androidのみ)。
openLocationSettings位置情報の設定画面を開きます (Androidのみ)。
checkPermissions現在の許可状態を確認します。
requestPermissionsBluetoothの許可を求めます。
startScanBLEデバイスをスキャンします。
stopScanBLEデバイスのスキャンを停止します。
connectBLEデバイスに接続します。
disconnectBLEデバイスから切断します。
createBondAndroid用のBLEデバイスとバインドする。
isBondedAndroid用のデバイスがバインドされているかどうかを確認する。
discoverServices接続されたデバイスのサービスを検出する。
getServicesデバイスの検出されたサービスを取得する。
getConnectedDevices接続されたデバイスの一覧を取得する。
readCharacteristic特性値を読み取る。
writeCharacteristic特性値に値を書き込む。
startCharacteristicNotifications特性の通知を開始する。
stopCharacteristicNotifications特性の通知を停止する。
readDescriptor記述値を読み取る。
writeDescriptor記述値に値を書き込む。
readRssi接続されたデバイスのRSSI(信号強度)を読み取る。
requestMtuAndroid での MTU サイズ変更を要求します。
requestConnectionPriorityAndroid での接続優先度を要求します。
startAdvertisingBLE サーバーとしてアドバタイズを開始します。
stopAdvertisingアドバタイズを停止します。
startForegroundServiceAndroid でのバックグラウンドで BLE 接続を維持するために、前景サービスを開始します。
stopForegroundServiceAndroid での前景サービスを停止します。
getPluginVersionGet the native Capacitor plugin version.
addListenerデバイスがスキャンされたイベントのリスナーを追加します。
addListenerデバイスが接続されたイベントのリスナーを追加します。
addListenerデバイスが切断されたイベントのリスナーを追加します。
addListener特性が変更されたイベントのリスナーを追加します。
removeAllListenersこのプラグインのすべてのリスナーを削除します。

このリファレンスは src/definitions.tscapacitor-低消費電力Bluetooth.

capgoから続けてください @capacitor/capgo-低消費電力Bluetooth

「capgoから続けてください @capacitor/capgo-低消費電力Bluetooth」というセクション

Capgoを使用している場合 capgo/capacitor-低消費電力Bluetooth Capgoを使用して Using @capgo/capacitor-bluetooth-low-energy for the native capability in Using @capgo/capacitor-bluetooth-low-energy, Capgo Enterprise Capgo Enterprise イオニック エンタープライズ プラグインの代替 __CAPGO_KEEP_0__ Enterprise Capgo の代替 Capgo の代替 Capgo のコンサルティング Capgo のコンサルティング