Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No popup to choose device #358

Closed
majaybabu opened this issue Mar 2, 2017 · 17 comments
Closed

No popup to choose device #358

majaybabu opened this issue Mar 2, 2017 · 17 comments

Comments

@majaybabu
Copy link

Is it possible to directly connect to a peripheral without having the user choose the peripheral and click on 'pair' ?

@g-ortuno
Copy link
Contributor

g-ortuno commented Mar 2, 2017

No. Any time you want to connect to a device we will show the chooser. What use case did you have in mind?

@majaybabu
Copy link
Author

Reduce friction for user for e.g when he is trying to make a payment on a merchant site and checkout. Connect to the device running GATT server with no 'device chooser popup' to get payment credentials. Want to remove friction around multiple clicks for the user on browser - 1. Click on a device 2. Click on Pair.

@majaybabu
Copy link
Author

Is this possible - Scan for devices and connect directly if there is only one device in the scan result. Without having the user choose that one device and pair - Can this feature be provided as an option ?

@g-ortuno
Copy link
Contributor

g-ortuno commented Mar 2, 2017

If we were to allowed that then any malicious site could connect any device around users.

@thegecko
Copy link
Contributor

thegecko commented Mar 2, 2017

There is of course the referring device from physical web

@majaybabu
Copy link
Author

Is it possible to customize the device chooser - Change the text from 'wants to pair' to any other customized message and instead of 2 clicks on the chooser to just one click to start pairing.

@majaybabu
Copy link
Author

@thegecko
Is it possible for the chrome running on OS X to scan for Eddystone URL beacon and then connect to it using navigator.bluetooth.referringDevice ? Any examples would really help.

@jyasskin
Copy link
Member

referringDevice isn't implemented yet, and when it is, that'll be user-directed scans, not page-directed scans. There will be a scanning API, but again, to communicate with a discovered device will take 2 permission prompts.

Chrome requires the two clicks from requestDevice() because it's pretty dangerous for users to grant access to a BT device, and we want to give them as much chance as possible to realize what they're doing. Even this level of concern still worries some people: http://www.tomshardware.com/news/google-web-bluetooth-webusb-apis,33589.html. However, another browser could certainly decide to use a different UI that lets the user select the first matching device with a single click.

@tigoe
Copy link

tigoe commented Aug 10, 2018

If we can't replace it with a custom chooser, would it be possible to make the device chooser conform to WCAG 2.0 guidelines? It doesn't currently work too well with a screen reader.

@reillyeon
Copy link
Contributor

@tigoe if you are having trouble using Chromium's chooser with a screen reader can you file a bug with details on crbug.com?

@tigoe
Copy link

tigoe commented Aug 10, 2018

Will do. Though I assume web-bluetooth ever gets adopted by other browsers, this will be an API issue, not a browser issue, won't it? Ultimately developers will need to be able to customize all of the UI, including the chooser.

@jyasskin
Copy link
Member

As long as each browser's UI is accessible, accessibility won't require developers to customize it.

@tigoe
Copy link

tigoe commented Aug 10, 2018 via email

@reillyeon
Copy link
Contributor

reillyeon commented Aug 10, 2018

The issue is that the chooser is security-sensitive UI and so there is a limit to how much the browser can allow a site to customize it. The site might be malicious and so the browser must be sure to present the chooser in a way that won't allow the site to confuse the user. The browser also cannot allow the site to observe the list of devices available in the chooser, only the device that the user has chosen. This puts severe limitations on how customizable the UI is. We don't allow customization for other permission prompts either.

crbug.com/873111 is the Chromium issue and we will follow-up there.

@zhongxunchao
Copy link

I saw the latest GATT Communication API list as:
Screen Shot 2020-05-22 at 2 26 05 PM
And the status of Chooser UI is yes, does it mean we can customize the Chooser UI now?

@reillyeon
Copy link
Contributor

No, we have no plans to make the chooser UI customizable. The API status simply means that the chooser UI is implemented.

@sbahmani
Copy link

Can I filter list with device id?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants