Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Calculadora

0

54
Vistas
Forget already paired device - web-bluetooth

I am working on web-bluetooth to connect a Web-App with BLE device. I have the connections now, I am looking how can I unpair a device.

I have looked into the official web-bluetooth documents https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetooth-getdevices haven't find much about it.

Can anybody suggest something on this?

Thanks

7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

What a coincidence! I am currently working on adding a new forget() method on BluetoothDevice so that web developers can revoke permission access to a paired BluetoothDevice.

// Request a Bluetooth device.
const device = await navigator.bluetooth.requestDevice({ acceptAllDevices: true });

// Then later... revoke permission to the Bluetooth device.
await device.forget();
  • Spec PR: https://github.com/WebBluetoothCG/web-bluetooth/pull/574
  • Chromium CL: https://bugs.chromium.org/p/chromium/issues/detail?id=1302328

Note that this experimental functionality is currently available in Chrome 101 and requires users to enable the chrome://flags/#enable-web-bluetooth-new-permissions-backend flag.

You can try my sample at https://bluetoothdevice-forget.glitch.me/

7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos