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

Feature request: Design a webpage that informs if webSerial or polyfill works on the device. #53

Closed
hpssjellis opened this issue Jun 6, 2023 · 2 comments

Comments

@hpssjellis
Copy link

@reillyeon

Feature request: Design a webpage that informs if webSerial or polyfill works on the device and prints the results to the page instead of console.log

Background: I presently am testing my students Android cell phones to see which ones work with polyfill. I think my old Samsung S20? used to work but I had to trade it in to get my new phone. My very Old Samsung S8 does not work. The problem with testing is that I have to connect an Arduino to their phone to see if it works. It would be much easier to have the webApp determine if polyfill should work.

Presently I think most Google Pixel phones should work, but would like to know which other phones work and if any developer options can be used to make more phones work with Polyfill.

If someone can show me the code I will write the app.

I think @gohai is close with this p5.js testing program, just the code does not give any feedback about polyfill on the canvas.
gohai/p5.webserial@f899391

My testing is showing that you can't check if webSerial or usb polyfill can be used until you connect a device, so it looks like I am back to connecting Arduinos to student's phones.

Anyone have a list of Phones that work with polyfill or developer options to turn on the ability? Any suggestions?

@reillyeon
Copy link
Collaborator

Detecting whether the Web Serial API is supported is easy, just check if navigator.serial is defined. Unfortunately I don't think it's possible to detect whether the OS will block access to the device through WebUSB because of an existing driver until you try to actually connect to the device.

@hpssjellis
Copy link
Author

Yeh, when I was testing it I saw that it has to open the WebSerial alert box before making a decision. I think I will close this issue. Re-open it anyone if this issue gets solved.

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

2 participants