Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Calculator

0

57
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs