コンテンツにジャンプ

@capgo/capacitor-Bluetooth Low Energy

Capacitor BLE通信用プラグインです。

概要

概要

Capacitor Bluetooth Low Energy プラグイン

基本機能

概要
  • initialize BLE プラグインを初期化する必要があります。どのメソッドも呼び出す前に呼び出してください。
  • shimWebBluetooth - Capacitor Web Bluetooth shim をインストールする navigator.bluetooth. API Web Bluetooth shim を手動で呼び出す前に、Capacitor ネイティブアプリから API Web Bluetooth shim を呼び出す。
  • isAvailable - デバイス上の Bluetooth が利用可能かどうかを確認する
  • isEnabled - デバイス上の Bluetooth が有効かどうかを確認する

Public API

Public API
MethodDescription
initializeBLE プラグインを初期化する。どのメソッドも呼び出す前に必ず実行する。
shimWebBluetoothCapacitor Web Bluetooth shimをインストールします。 navigator.bluetooth. API Web Bluetooth shim を手動で呼び出す前に、Capacitor ネイティブアプリから API Web Bluetooth shim を呼び出す。
isAvailableデバイス上の Bluetooth が利用可能かどうかを確認する
isEnabledデバイス上のBluetoothを有効にしているかどうかを確認してください。
isLocationEnabled位置情報サービスが有効になっているかどうかを確認してください (Android 限定)。
openAppSettingsアプリの設定画面を開きます。
openBluetoothSettingsBluetoothの設定画面を開きます (Android 限定)。
openLocationSettings位置情報の設定画面を開きます (Android 限定)。
checkPermissions現在の許可状態を確認してください。
requestPermissionsBluetoothの許可を求めます。
startScanBLEデバイスのスキャンを開始します。
stopScanBLEデバイスのスキャンを停止します。
connectBLEデバイスに接続します。
disconnectBLEデバイスから切断します。
createBondBLEデバイスとバンドを形成します (Android 限定)。
isBondedAndroidのみでデバイスがバウンドされているかどうかを確認します。
discoverServices接続されたデバイス上のサービスを発見します。
getServicesデバイスの発見されたサービスを取得します。
getConnectedDevices接続されているデバイスの一覧を取得します。
readCharacteristic特性値を読み取ります。
writeCharacteristic特性に値を書き込みます。
startCharacteristicNotifications特性の通知を開始します。
stopCharacteristicNotifications特性の通知を停止します。
readDescriptor記述子値を読み取ります。
writeDescriptor記述子に値を書き込みます。
readRssi接続されたデバイスのRSSI(信号強度)を読み取ります。
requestMtuAndroidのみでMTUサイズの変更を要求します。
requestConnectionPriorityAndroid では優先度を要求します。
startAdvertising周辺機器として広告を開始します (BLE サーバー)。
stopAdvertising広告を停止します。
startForegroundServiceAndroid ではバックグラウンドで BLE 接続を維持するために、前景サービスを開始します。
stopForegroundServiceAndroid では前景サービスを停止します。
getPluginVersionCapacitor プラグインのネイティブバージョンを取得します。
addListenerデバイスがスキャンされたイベントのリスナーを追加します。
addListenerデバイスが接続されたイベントのリスナーを追加します。
addListenerデバイスが切断されたイベントのリスナーを追加します。
addListener特性が変更されたイベントのリスナーを追加します。
removeAllListenersこのプラグインのすべてのリスナーを削除します。

Capgo src/definitions.ts in capacitor-bluetooth-low-energy.

Capgoから続けて@capgo/capacitor-Bluetooth低エネルギー

@capgo/capacitor-Bluetooth Low Energy

Capgoを使用している場合、Bluetooth Low EnergyプラグインはCapacitorの標準機能です。 @capgo/capacitor-Bluetooth Low Energy migration計画とエンタープライズオペレーションを計画するには、 @capgo/capacitor-Bluetooth Low Energy for the native capability in Using @capgo/capacitor-bluetooth-low-energy Capgo 企業版 Capgoの製品ワークフローについてはCapgo Enterpriseを参照してください。 Ionic Enterprise Pluginの代替 Capgoの製品ワークフローについてはIonic Enterprise Pluginの代替を参照してください。 Capgoの代替 Capgoの製品ワークフローについてはCapgoの代替、 Capgoコンサルティング Capgoの製品ワークフローについてはCapgoコンサルティングを参照してください。