Browser Awareness of Bluetooth Beacons / iBeacons

前端 未结 3 1444
無奈伤痛
無奈伤痛 2021-02-06 05:08

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 th

3条回答
  •  野的像风
    2021-02-06 05:28

    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

提交回复
热议问题