Search code examples
javascriptbrowsergeolocationbluetooth-lowenergyibeacon

Browser Awareness of Bluetooth Beacons / iBeacons


Is there a way to make a browser aware of iBeacon devices in its proximity?

Similar to the way HTML5 Geolocation is working...

If not would this be something that can be achieved with a browser plug-in that can provide the detail to be consumed by javascript?


Solution

  • Unfortunately, no. No web browsers have implemented any bridges between beacon detection and JavaScript.

    I don't think a plugin approach is possible on mobile browsers (either iOS or Android), because neither browser supports asynchronous communication between external apps and JavaScript in Mobile Safari / Mobile Chrome. The best you could do is have a custom app that responds to a beacon, then launches a web page in the browser. But I realize that isn't what you are asking for.

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

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

    There is also a Cordova plugin that has basic beacon support here:

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