Listening iBeacons even if the app is closed

送分小仙女□ 提交于 2019-12-13 05:43:14

问题


I was wondering if it is possible to listen ibeacons even if the app that have the implementation (code to interact over BLE - ibeacons) is closed.

Is it possible? Can i write a code that 'tells' to the device to listen ibeacons all the time and if found any, need to do some action based on code from specific app? Or i need that my app still running all the time to listen the ibeacons?

Thank in advance.


回答1:


Yes, the Android Beacon Library is designed to do exactly this. It automatically launches a background beacon scanner service on various system events, and can then start your app's Activities based on beacon detections.

See here for details: http://altbeacon.github.io/android-beacon-library/background_launching.html



来源:https://stackoverflow.com/questions/27923110/listening-ibeacons-even-if-the-app-is-closed

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