Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot detect iBeacon using AltBeacon/android-beacon-library

Currently, I am working on a project using an android phone to detect iBeacons and read/write the uuid, major minor etc information from iBeacon

After searching on the web, it seems that AltBeacon/android-beacon-library is recommended to use for detecting the iBeacons. However, I cant find any result of iBeacons when I try the sample code of the the following link-http://altbeacon.github.io/android-beacon-library/samples.html or I run the sample reference app-https://github.com/AltBeacon/android-beacon-library-reference . I have download an app called "Locate" from Google Play developed by Radius Networks and it aslo cannot find my iBeacon.

All above ways fail to show the iBeacons result. When I try debug on it, functions like didRangeBeaconsInRegion(), didEnterRegion(), didExitRegion() never be called.

However from logcat I find some device information:

10-24 13:56:31.878: D/BluetoothAdapter(14042): onScanResult() - Device=20:CD:39:80:60:F7 RSSI=-70

I have tested that my iBeacons should be ok with the app - iBeacon Detector and it can detect my iBeacon.

Did I miss some steps? Or this library is not suitable for my development? Please comment.

I am quite new to Android development and iBeacons, please let me know if you need additional requirement. Thanks for you help.

like image 975
bill Avatar asked Feb 12 '23 17:02

bill


1 Answers

I'm trying to do the same thing as you did. And I also want to use AltBeacon/android-beacon-library, but I haven't done it yet, answer below is my guess, hope it can give you some clue.

I think your problem might be the misuse of the library.

According to the home page of Android-beacon-library http://altbeacon.github.io/android-beacon-library/index.html, it says,

By default, it will only detect beacons meeting the open AltBeacon standard. If you wish to configure the library to work with different types of beacons, see the documentation for the BeaconParser class.

iBeacon is a beacon standard different from the open AltBeacon standard used in the Android-beacon-library, so if you want your app using the Android-beacon-library to detect an iBeacon device, you have to implement the BeaconParser which can parser messages conforming to iBeacon standard.

like image 60
Zhanyun Xiong Avatar answered Feb 26 '23 22:02

Zhanyun Xiong