マニフェスト - Bluetooth

bluetooth マニフェスト プロパティは、bluetooth API で使用可能な権限を宣言します。

manifest.json の例

{
  "name": "My Bluetooth app",
  "bluetooth": {
    // Permission for chrome.bluetoothSocket:
    // The application is allowed to communicate with devices
    // using the protocols, profiles, or services identified by
    // the UUIDs 0x1105 and 0x1106 using the BluetoothSocket API.
    "uuids": [ "1105", "1106" ],
    "socket": true
  },
  ...
}
{
  "name": "My Bluetooth app",
  "bluetooth": {
    // Permission for chrome.bluetoothLowEnergy:
    // The application is allowed to communicate with devices
    // using the profiles identified by the UUIDs 0x180D, 0x1809 and 0x180F
    // using the BluetoothLowEnergy API.
    "uuids": [ "180D", "1809", "180F" ],
    "low_energy": true
  },
  ...
}

リファレンス

  • uuids(文字列の配列) - 省略可

    uuids マニフェスト プロパティは、アプリが通信できるプロトコル、プロファイル、サービスのリストを宣言します。

  • socket(ブール値) - 省略可

    true の場合、アプリに bluetoothSocket API を使用する権限を付与します。

  • low_energy(ブール値) - 省略可

    true の場合、アプリに bluetoothLowEnergy API を使用する権限を付与します。

  • peripheral(ブール値) - 省略可

    true の場合、bluetoothLowEnergy API のアドバタイズメント関数を使用する権限をアプリに付与します。