Working iBeacon/BLE beacon app code example

和自甴很熟 提交于 2019-12-13 08:59:59

问题


I am looking for a tested working example code of android app that creates a virtual beacon and starts advertising it. Ive tested already couple of tutorials/examples but without success. My target environment is Android 7 on Galaxy S7.
Appreciate your help. !


回答1:


There is a transmitter section on the Android Beacon Library sample page here:

http://altbeacon.github.io/android-beacon-library/samples.html

Two tips to making this work so it is detectable by another app.

  1. Set the proper BeaconLayout of the beacon type you want to transmit. You can see the beacon layout strings for various beacon types here:

https://beaconlayout.wordpress.com

  1. If you want to transmit iBeacon make sure you set the company code to that of Apple (0x004c) so it is recognized as an Apple iBeacon format.


来源:https://stackoverflow.com/questions/46868465/working-ibeacon-ble-beacon-app-code-example

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!