Hello Estimote community,
I am building a simple android app that collects nearable packets from stickers and stores them on the phones memory then does stuff with that data.
The android phones that I am testing on seem to be registering nearable packets at different time intervals.
My initial test/dev phone, a Nexus5 running android 6.0.1 works great and constantly picks up a packet roughly every second.
A yuntab5 phone does not seem compatible with nearable packets as I could not detect any on my app and on the official Estimote app.
A ZTE phone running android 7.1.1 registers one packet roughly every 30 seconds.
And a UMIDIGI phone running android 8.1.0 also registers one packet roughly every 30 seconds.
and sometimes on this and the ZTE it seems to freeze up or stop listening for packets altogether.
Here is the relevant code I am using:
onCreate() {
...
beaconManager = new BeaconManager(this);
beaconManager.setNearableListener(new BeaconManager.NearableListener() {
@Override
public void onNearablesDiscovered(List<Nearable> nearables) {
for (Nearable item : nearables) {
// Store item data
}}}
}
...
then
@Override
protected void onStart() {
super.onStart();
beaconManager.connect(new BeaconManager.ServiceReadyCallback() {
@Override
public void onServiceReady() {
beaconManager.startNearableDiscovery();
}
});
} // END onStart()
My question is, are these issues stemming from the phones themselves or am I using NearableListener() and startNearableDiscovery() incorrectly?
Thanks in advance.