ไฟล์ Manifest - บลูทูธ

พร็อพเพอร์ตี้ไฟล์ Manifest bluetooth จะประกาศว่าสิทธิ์ใดที่พร้อมใช้งานสำหรับ API bluetooth

ตัวอย่าง 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 (อาร์เรย์ของสตริง) - ไม่บังคับ

    พร็อพเพอร์ตี้ไฟล์ Manifest ของ uuids จะประกาศรายการโปรโตคอล โปรไฟล์ และบริการที่แอปสื่อสารได้

  • socket (บูลีน) - ไม่บังคับ

    หากเป็น true โปรดให้สิทธิ์แอปใช้ bluetoothSocket API

  • low_energy (บูลีน) - ไม่บังคับ

    หากเป็น true โปรดให้สิทธิ์แอปใช้ bluetoothLowEnergy API

  • peripheral (บูลีน) - ไม่บังคับ

    หากเป็น true ให้สิทธิ์แอปใช้ฟังก์ชันโฆษณาใน API bluetoothLowEnergy