I have used Demo to detect ibeacons near android phone.
But in didRangeBeaconsInRegion() callback never get 2 iBeacons detected. Even one is deactivated and other is activited it gives uuid of previous one.
Let me brief it with an example. One ibeacon is on with uuid(a unique no given to ble chip) 123. Lib is detecting it perfectly fine. Now deactivate 123 and keep on ibecon with uuid 890. But lib is still detecting 123 not 890.
I want to detect all ibeacons near my phone.
I have used other lib named AltBeacon. It solved my problem. Now multiple ibeacons get detected .They have given solution for ranging Ibeacon.
If anyone using eclipse than can get lib from here as altbeacon github repository is for gradle build system.
Related
I've been trying to use the sample app in the flutter_beacon library to detect beacons nearby and have bought an "Avvel" iBeacon that I have set up and can detect using the "BLE Scanner" app from the google play store. I made sure to allow location tracking within the sample app, as well as having a constant wifi connection and having my Bluetooth on. It just doesn't pick it up and by that, I mean that I have a spinning circle in the middle of the screen, and in my console in "Android Studio" I get the message
I/flutter (15631): {"region":{"identifier":"Cubeacon","proximityUUID":"cb10023f-a318-3394-4199-a8730c7c1aec"},"beacons":[]}
every half second or so.
The repo for the sample app is the master branch here: https://github.com/alann-maulana/flutter_beacon.
The phone is an original Pixel but as I said, I can detect the beacon using another beacon detection app so I doubt its a hardware issue.
Below is the image of the screen. (Taken from the android emulator in android studio for ease of screenshotting rather than the actual phone).
image
Any suggestions or solutions would be greatly appreciated. If you need anything else from me then I would be more than happy to oblige.
The problem is that the beacon region defined in the sample app has Proximity UUID cb10023f-a318-3394-4199-a8730c7c1aec, and the beacon used for testing has Proximity UUID EBEFD083-70A2-47C8-9837-E7B5634DF524. These must be the same. To get the program to work, change the region definition in the Flutter sample to match your beacon's UUID: EBEFD083-70A2-47C8-9837-E7B5634DF524.
I am using petermetz/cordova-plugin-ibeacon in my hybrid application, plan to deploy it on Android devices only.
I have seen application that detect beacons placed nearby, and i want to achieve same functionality but using cordova plugin in my hybrid app.
Can some one help in detecting ibeacons present nearby with their details like their UUID as the sample given doesn't explains much about scanning.
Thanks,
Rohit
Simply follow the example on the README of the page linked in the question for "Start ranging a single iBeacon", and replace the major and minor field values with null. This will scan for all beacons with the UUID specified.
It is not possible to use the plugin to scan for all beacons regardless of UUID because iOS does not allow this.
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.
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.
You basically need to do this:
beaconManager.getBeaconParsers().add(new BeaconParser().
setBeaconLayout("m:0-3=4c000215,i:4-19,i:20-21,i:22-23,p:24-24"));
For more information, refer to Is this the correct layout to detect iBeacons with AltBeacon's Android Beacon Library?
I am trying to use the AltBeacon/android-beacon-library. I started with the reference app. Followed all the instruction to setup the app, but it still cannot find any beacon around. I also tried the Locate app, it cannot find beacons neither. I don't think there is anything wrong with the RadBeacons, since I can configure them with the app on iPhone. The Android phone I tried are Moto X(Android 4.4.4) and Samsung S3(Android 4.4.2), installed apps on both phones, neither of them works. Looked into the log of the library, as follows:
09-10 15:46:02.571: D/BtGatt.btif(1990): btif_gattc_upstreams_evt: Event 4096
09-10 15:46:02.571: D/BtGatt.GattService(1990): onScanResult() - address=3D:AC:95:C9:1C:D5, rssi=-64
09-10 15:46:02.571: D/BeaconService(11355): got record
09-10 15:46:02.577: D/WifiStateMachine(924): handleMessage: X
09-10 15:46:02.577: D/BeaconParser(11355): This is not a matching Beacon advertisement. (Was expecting be ac. The bytes I see are: 0201061aff4c000215078701d2fa844b429c161417dabc159d00010001c20000000000000000000000000000000000000000000000000000000000000000
Also tried to install other apps from Google Play, such as iBeacon Finder, they do find the beacon.
Are there any additional configuration needed for the app or the beacon?
Can anyone help me about this? Very appreciated!
The issue is that you are using a proprietary beacon type, which by default the library will not recognize. Understand that in order to keep the library free of intellectual property, by default it will only detect beacons meeting the new AltBeacon specification. We cannot pre-configure it to detect proprietary beacons.
You may easily configure the library to work with proprietary beacons, but you must add a line of configuration code yourself. Read the documentation in the BeaconParser class for details.
I'm working on a BLE proximity sensing feature based on Android and need some information.
Currently I see there are no BLE beacons manufacturers for android. I found 2 so far for iPhone.
1) http://www.estimote.com
2) http://www.gimbal.com
Estimote claims that their devices are generic but mainly they are publicized for iBeacons. So I'm not sure whether I should order them for a feature on Android.
Secondly gimbal explicitly mentions that their devices won't be enabled for android for proximity sensing.
So if any of you know where can I order BLE beacons compatible with Android please let me know.
Another thing, for prototype testing I was wondering whether I could use a Android BLE capable tablet or smartphone as a beacon to emit BLE signals?
Till now the documentation for android only suggests how to detect a beacon, But I'm not sure whether an Android device can be used as a beacon.
Any insights?
There is a BLE Beacon manufacturer for Android: Radius Networks
You can detect any standard iBeacon on Android using our Android iBeacon Library.
You can try it out yourself with our free iBeacon Locate app, which is based on this library. My company also sells both software and hardware iBeacons that I guarantee work with Android. But again, any standard iBeacon will work, too. Don't take my word for it -- just download our free app and use it to see one of our iBeacons. (We even have a free virtual machine you can use!)
It is currently not possible to make an iBeacon out of a stock Android device because the Bluetooth LE APIs, introduced in Android 4.3, do not support the peripheral mode needed to transmit advertisements like an iBeacon.
EDIT: It is now possible to make rooted Android 4.4.3 devices transmit as an iBeacon. See here.
I tried simple BLE scan app on Android, but the callback for LeDevices always returned null for UUID[]. Also, finding based on know UUID didnot work.
To add to David's reply. I have tried Radius Networks SDK, pretty clean. I like it.
Also, Estimotes has released their Android SDK today(1/7), which is good. The sample App shows notification, Distance, Major-Minor. I tested with 3 Estimotes & also with iPhone's app (making the iPhone as iBeacon). It works well, give it a try.
Note that you have to modify the code
change the ESTIMOTE_PROXIMITY_UUID value to the UUID that you are watching for.
Hope it helps.