Manifest – Bluetooth

In der Manifesteigenschaft bluetooth wird angegeben, welche Berechtigungen für die Bluetooth API verfügbar sind.

Beispiel für „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
  },
  ...
}

Referenz

  • uuids (Array des Strings): optional

    Das Manifestattribut uuids gibt die Liste der Protokolle, Profile und Dienste an, über die eine App kommunizieren kann.

  • socket (boolesch) – optional

    Bei true wird einer App die Berechtigung erteilt, die bluetoothSocket API zu verwenden

  • low_energy (boolesch) – optional

    Bei true wird einer App die Berechtigung erteilt, die bluetoothLowEnergy API zu verwenden

  • peripheral (boolesch) – optional

    Bei true wird einer App die Berechtigung erteilt, die Werbefunktionen in der bluetoothLowEnergy API zu verwenden