Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I try Web Bluetooth on Chrome for Android Lollipop?

The experimental Web Bluetooth API works quite well in the Dev version of Chrome for Android Marshmallow. I can simply enable the experimental flag at chrome://flags/#enable-web-bluetooth and I'm good to go.

Sadly the Web Bluetooth API doesn't work on my Android Lollipop device. Why?

like image 462
François Beaufort Avatar asked Jan 15 '16 11:01

François Beaufort


1 Answers

UPDATE: As of April 17th, 2017, Web Bluetooth on Android now requires Android Marshmallow: http://crbug.com/694332

First of all, thanks for asking. You're not the only one for sure...

As mentioned in https://github.com/WebBluetoothCG/web-bluetooth/blob/gh-pages/implementation-status.md#notes,

Tip of tree Chromium builds work on Android Lollipop or later for ease of developers - but Chrome versions will only ever support Marshmallow or later.

So here's how to play with Web Bluetooth on Chrome for Android Lollipop:

  1. Open the Android Settings app
  2. Make sure "Developer Options" are unlocked and available - help
  3. Select "Developer" and enable "USB Debugging"
  4. Plug your Android device to your computer
  5. Accept "USB Debugging" session on your Android Device
  6. Download the latest Chromium build for Android at https://download-chromium.appspot.com/?platform=Android on your computer
  7. Extract the downloaded chrome-android.zip file in your ~/Downloads folder for instance
  8. Install ADB on your computer if it's not already there yet
  9. Install Chromium by typing adb install -r ~/Downloads/chrome-android/apks/ChromePublic.apk in your shell
  10. Open the new Chromium App on your Android device
  11. Accept a Chromium Location prompt by going to https://www.google.com for instance - Location permission is needed to access Bluetooth in Chrome for Android Lollipop.
  12. Finally enable the experimental flag at chrome://flags/#enable-web-bluetooth and/or request an Origin Trial token so that your website can use the Web Bluetooth API without any flag.
  13. Play with some Web Bluetooth samples at https://googlechrome.github.io/samples/web-bluetooth/

Notes:

  • When using Web Bluetooth, make sure Android Bluetooth and Location in the drop down Quick Settings are turned on.
  • You may want to toggle Android Bluetooth off and on sometimes... Just saying ;)
  • Report bugs to the chromium team at https://bugs.chromium.org/p/chromium/issues/entry?components=Blink%3EBluetooth

Warning! The Chromium build for Android won't auto-update like Google Chrome. If you want a new build of Chromium to test new features, you'll have to re-download one and re-install it on your Android device.

like image 145
François Beaufort Avatar answered Oct 06 '22 17:10

François Beaufort