using web serial API in windows, mac os, and Linux chrome browser I can receive and send data. but in the android chrome browser, I am not able to send or receive data from a serial device.
so which API is used to read and write data to serial devices in the android chrome browser.
also, there is a polyfill serial API for android chrome but is showing an error shown in the image.
The team that built the implementation of the Web Serial API in Chromium also wrote a polyfill library which uses WebUSB to support platforms which don't provide built-in serial drivers: https://github.com/google/web-serial-polyfill
It looks like you are already trying to use this library. Can you file an issue on the library's GitHub project so the team can look at the error you're seeing?
Note, it seems like there are some Android devices which have USB serial drivers that end up blocking WebUSB from claiming interfaces even though the platform doesn't let apps actually use them. https://crbug.com/1099521 is tracking a workaround for that.
Related
I am trying to connect to an ANT+ usb stick using Web Serial API in Google Chrome.
On linux (Ubuntu) it works out of the box, but on MacOS (v12.1) the device doesn’t show up into the search box. It does show up when using the web-serial-polyfill, but it is unfinished and missing features, and since the navigator.serial is present I wish to avoid using the polyfill.
var port = await navigator.serial.requestPort({ filters: [{ usbVendorId: 4047 }]});
Gets me ‘No compatible device found’. Requesting without params shows other devices, but not the ANT+ stick.
Any ideas why is that?
Currently, I have created a Chrome App that gets data from a serial connection using the Chrome App Serial API. My goal is to inject this data into a web page. I know this is capable with Chrome Extensions, but the issue there is that Chrome Extensions aren't capable of accessing the serial data on it's own. I also would like to use an Extension instead of an App because the Chrome Apps aren't going to be supported starting this year.
The only option I could think of is to use a Chrome App to get the serial data, send the data to an Extension, and then inject the data into a web page. This is definitely not preferable though. Besides the Chrome Apps not being supported, except for Chrome OS, I wouldn't like to have to have a user download the extension and the app just to implement this.
My preferred method would to have an Extension access the serial devices. Is this possible and/or is it going to possible in the future? If not, why?
Thanks in advance!
I have created a simple twilio client application to make phone calls from Web Browser to phones. I used a sample Flask app to generate a secure Capability Token and used twilio.min.js library to handle calls from my HTML.
The functionality works fine in Computer Browsers and Android Phone Browsers, but fails in IOS browsers(checked both in Safari and Chrome). In android the page asks for permission to use mic and headphone but in IOS it doesnot even as for that. Is there anything that I am missing here? It would be really helpful if someone can throw some light into this.
The doc I referred to was : Twilio Hello Monkey Client
Twilio developer evangelist here.
Twilio Client uses WebRTC and falls back to Flash in order to make web browsers into phones. Unfortunately Safari on iOS supports neither WebRTC nor Flash so Twilio Client cannot work within any browser on iOS.
It is possible to build an iOS application to use Twilio Client just not a web application.
Does Chrome for Android Beta have a bluetooth (javascript) API? Google reports that Chrome Beta and Dev channels have the bluetooth api [1] but I cannot call it on Android and Desktop versions of Chrome Beta.
I check for the api by evaluating chrome.bluetooth:
if(!chrome.bluetooth) {
logError('bluetooth api not found');
return;
}
Is there any way (programmatically, or other) to check what apis are supported in a particular Chrome version? console.log(JSON.stringify(chrome)) doesn't do it.
[1] https://developer.chrome.com/apps/api_index
Answering my own question: It appears the API are only available to Chrome Packaged Apps and Extensions. Furthermore, an API is only exposed if listed in the manifest.json file. In other words, there appears to be no easy way to programmatically list the API available.
An experimental Web Bluetooth API is being added as we speak (not literally of course) in Chrome Dev for Android.
Check out https://developers.google.com/web/updates/2015/07/interact-with-ble-devices-on-the-web to learn more about it.
I'm familiar with SQLite from having worked with it using the System.Data.SQLite provider for .NET and also Adobe AIR using ActionScript. I've been asked to investigate what is involved in creating offline data-driven apps for mobile devices (iPhone+iPad and Android for now, maybe Blackberry). The database would have to be available locally on the device because users would often be in rural areas with very unreliable and spotty cellphone reception.
Will the same javascript codebase run unchanged on iDevices and Android devices? Or will separate versions be required for each mobile OS? I see the W3 has discontinued the standards process for local web SQL database(s) because there's only one SQL contender at present and it takes at least two to tango. Is the webkit javscript SQL API in a state of flux?
Hello Tim,
When developing database centric applications for Android and IPhone, you are not locked in to using Sqlite. There is another alternative, which in many cases might be even better; namely CouchDB.
In both cases there are solutions available which makes it easy to develop database centric applications for Android and IPhone using the same code.
CouchDB
CouchDB, although written in Erlang, is basically a JSON based database using javaScript as its default interface. CouchDB can be extremely fast. However, CouchDB is not a relational database.
License: Apache license, 2.0.
Official site: http://couchdb.apache.org/
CouchDB for Android: https://github.com/couchbase/Android-Couchbase
CouchDB for IPhone: http://www.macworld.com/article/159606/2011/05/couchbase.html
Sqlite
PhoneGap is the choice if you prefer working with Sqlite. Using PhoneGap you can use the same javaScript code for both IPhone and Android for communication with Sqlite, and simply replace the middleware to match the OS you are compiling.
For Android the middleware is phonegap-version.jar, whereas for IPhone the file is named phonegap-version.dmg.
In addition to Android and IPhone, PhoneGap makes it possible to port the same applications to Blackberry, WebOS, Symbian and Bada.
License: BSD/MIT.
Official site: http://www.phonegap.com
SQLite is the only option when developing HTML5 Web Apps (if I understood you correctly).
You can check information about IndexedDB, which is already implemented in WebKit (Chrome 12) as window.webkitIndexedDB and also Firefox has implemented it.