Hi there
I just finished off my dissertation project & in my code i implemented estimote beacons support using android studio.
I have been provided with a beacon, it is built with hardware D. My code uses beacon-managers, i just found out that it does not support hardware D.
is it possible to monitor ranges such as, “immediate”, “close”, “far”, using hardware D ?
When i access the beacon from the estimote app, the available category options are “cloud data”, “transmitted packets”, “device details” and “inbuilt senors”. There is no “Broadcasting Settings” category. Is this because the beacon is hardware D ?
The beacon is registered under the institute who provided it to me. Do these “Broadcasting Settings” have to be enabled from the account?
The first-generation “D” beacons don’t work with our new Estimote Proximity SDK, but you can use our older “Estimote SDK”, here’s an integration tutorial:
We don’t generally recommend doing that anymore, but since it seems you’re stuck with the older hardware, there aren’t many other options. (Unless you can convince the institute to get you the latest generation! )
Alternatively, since these beacons broadcast standard iBeacon/Eddystone packets, you can use any other SDK that supports iBeacon or Eddystone.
So I followed the instructions of the first link you sent. Applied everything except for the “Tying beacon data and app data together”. As for now, I just want to detect them.
So now I’m getting these messages
I/EstimoteSDK: BeaconManager.startMonitoring:891 Not starting monitoring, not connected to service
BeaconManager.startRanging:637 Not starting ranging, not connected to service
I/EstimoteSDK: BeaconService.onCreate:79 Creating beacon service for android version 27
D/BluetoothAdapter: isLeEnabled(): ON
D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=15 mScannerId=0
You are starting monitoring before service is initialised. Here is an example from tutorial:
beaconManager = new BeaconManager(getApplicationContext());
// add this below:
beaconManager.connect(new BeaconManager.ServiceReadyCallback() {
@Override
public void onServiceReady() {
beaconManager.startMonitoring(new BeaconRegion(
"monitored region",
UUID.fromString("B9407F30-F5F8-466E-AFF9-25556B57FE6D"),
22504, 48827));
}
});
You need to call startMonitoring or 'startRanging__after__ you getonServiceReady` callback.
Logs are showing that you first try starting monitoring:
I/EstimoteSDK: BeaconManager.startMonitoring:891 Not starting monitoring, not connected to service
BeaconManager.startRanging:637 Not starting ranging, not connected to service
and then you get information that beacon service has started:
I/EstimoteSDK: BeaconService.onCreate:79 Creating beacon service for android version 27
Perfect, now these errors are fixed and not showing up :
Not starting monitoring, not connected to service
Not starting ranging, not connected to service
Now i’m only getting this,
I/EstimoteSDK: BeaconService.onCreate:79 Creating beacon service for android version 27
D/BluetoothAdapter: isLeEnabled(): ON
D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=15 mScannerId=0
Does rangingListener returns empty list or it is not called at all?
Have you properly set ranging region? Can you try with region that matches all beacons:
now i also have another class, by following the instructions on the link.
so this code is from the “MainActivity”. The funny thing is, on the url there is nothing which calls either classes to one another
atm i’m running android 8.1 on a google pixel 2 xl
however, when i do my testing for data aggregation. it’s going to probability be Android 6.0 (API 23, marshmallow )
the output is still
I/EstimoteSDK: BeaconService.onCreate:79 Creating beacon service for android version 27
D/BluetoothAdapter: isLeEnabled(): ON
D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=16 mScannerId=0
I actually tried that before, to see if it will detect any of the beacons, the results were still the same.
about the UUID, i changed it for the code example i provided above, forgot about the screenshot tbh.
I have been rereading the tutorials, reading some documentation. There was something regarding time intervals, i don’t think it applies for this hardware (D3.4) version. am i correct? if i’m not then i’ll implement them and hopefully solve the issue
I also just tired it on a moto g4 android 7.0 , the result was the same
I/EstimoteSDK: BeaconService.onCreate:79 Creating beacon service for android version 24
D/BluetoothAdapter: STATE_ON
D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=6 mClientIf=0
now there is something weird going on
it is discovering (onBeaconsDiscovered) 5 beacons, however the “onEnteredRegion” is only showing one beacon.
now when i move that one out of range and restart, the “onEnteredRegion” is detecting the same one.
the “onExitedRegion” didn’t even work once. i also tried cleaning and rebuilding the project and tried different methods to see if it will get detected.
i’m using android 8.1, google pixel 2
if anyone has any ideas, i would be very happy to hear them
That is normal. Monitoring only returns beacons that triggered onEnter event. See JavaDoc
You may try to test it on older Android versions. This SDK might not work work well with Android 8 scanning restrictions (however Proximity SDK handles that well).
strange thing is that the onEnter event trigger is only works once. i am thinking that it has got something to do with android 8.0 .
i got to wait a couple of days before i can try it on an older android version.
what i realized is that it is always detecting the closest beacon to the phone, without any onEnter trigger
fingers crossed i love these beacons and it would be so awesome if the version number is the only issue.
in the meantime i’ll keep on trying, maybe it’s something from my side. i’ll keep this thread updated, so maybe it might help someone else in the future
hey everyone so i got a couple of days to test it on a lower version of android. so i decided to come up with a backup. if you simply want to detect the closest beacon, you might want to try this
its something very simple
beaconManager.startRanging(region);
beaconManager.setRangingListener(new BeaconManager.BeaconRangingListener() {
@Override
public void onBeaconsDiscovered(BeaconRegion beaconRegion, List<Beacon> beacons) {
System.out.println("beacons detected");
for (int i = 0; i < beacons.size(); i++) {
for (int j = 0; j < beacons.size(); j++) {
if(beacons.get(i).getRssi() > beacons.get(j).getRssi()) {
System.out.println("the closest beacon is : "+beacons.get(i).getProximityUUID());
}
}
}
}
});