Knowledge of Bluetooth Beacons / iBeacons

Is there a way for the browser to know about iBeacon devices in close proximity?

Similar to how HTML5 Geolocation works ...

If this were not something that could be achieved with a browser plug-in, which can provide the details that javascript will use?

+6
source share
3 answers

Unfortunately not. No web browsers have implemented any bridges between beacon detection and JavaScript.

I don’t think the plugin is suitable for mobile browsers (iOS or Android), because no browser supports asynchronous communication between external applications and JavaScript in Mobile Safari / Mobile Chrome. The best you can do is set up a custom application that responds to the beacon and then launches the web page in a browser. But I understand that this is not what you are asking for.

If you want to create a native JavaScript application, you can use Cordova (aka PhoneGap) and use plugins that provide beacon support. My company has one for our ProximityKit beacon system:

https://github.com/RadiusNetworks/proximitykit-plugin-cordova

There is also a Cordova plugin with basic beacon support:

https://github.com/petermetz/cordova-plugin-ibeacon

+5
source

This looks promising (2016) on the Google Chrome developers site showing the desktop browser function in progress.

https://developers.google.com/web/updates/2015/07/interact-with-ble-devices-on-the-web?hl=en

Despite the fact that the specification of the Web Bluetooth API is not yet complete, the Chrome team is actively looking for development enthusiasts (I mean you) to try this API to work during the development process and give the specification and implementation feedback.

The Bluetooth web interface API is currently available for experimental use on your origin in Origin Trials or locally on your computer using the experimental flag. The implementation is partially completed and currently available on Chrome OS, Chrome for Android M, Linux, and Mac.

Go to chrome: // flags / # enable-web-bluetooth, enable flag selection, restart Chrome, and you should be able to scan and connect to a number of Bluetooth devices, read / write characteristics of Bluetooth, receive GATT notifications and know when the device Bluetooth gets disconnected.

https://github.com/WebBluetoothCG/web-bluetooth/blob/gh-pages/implementation-status.md

+2
source

There is a W3C specification for this Web Bluetooth , but there is no support yet: http://caniuse.com/#search=bluetooth .

If you decide to write a Phonegap plugin, implementing this specification will be a good starting point.

+1
source

Source: https://habr.com/ru/post/978045/


All Articles