Estimote / Android-Fleet-Management-SDK

Estimote Fleet Management SDK for Android
https://developer.estimote.com
MIT License
836 stars 451 forks source link

Android 5.1 SDK version 1.0.12+ onEddystoneFound bug #248

Closed Sharprender closed 7 years ago

Sharprender commented 7 years ago

Hey there, I've used for a while the version 0.16.0 and all work fine. But now I've migrated to 1.0.12.

I only use Android 4.4 and 5.1.

IMPORTANT: NO 6+ devices!

~~setRegionExitExpiration(1000) seems to be not settable. I dismantled a beacon and removed the batteries and it seems, that setRegionExitExpiration is set to 20s. But I set it to 1000ms=1s with "beaconManager.setRegionExitExpiration(1000);" and beaconManager is the object of BeaconManager.~~

See comment below

What can I do in this case? In our app is time very important. 5 seconds are ok, but 20s are fatal for our use-case.

wafel82 commented 7 years ago

Hi, We'll investigate this issue and let you know as soon as we find something. Stay tuned!

Regards Wojtek

wafel82 commented 7 years ago

Hi,

Confirmed - this is a bug in recent SDK versions. We're working hard to solve the issue. Fix should be available in upcoming SDK version - stay tuned :)

Regards Wojtek

wafel82 commented 7 years ago

New SDK version is ready to be downloaded: compile 'com.estimote:sdk:1.0.13 Check it out and let us know if fix works as expected.

Regards Wojtek

Sharprender commented 7 years ago

Nope , it works not as expected.

~~I've tried setRegionExitExpiration(60000) and setRegionExitExpiration(1000), but it is always set to 20000=20s.~~

See comment below

I've tried it on Android 5.0.1 and 5.1 devices.

Important: I'm using an EddystoneListener

Sharprender commented 7 years ago

@wafel82 Here is a topic from Estimote forum, where I described a problem. onEddystonesFound for 20s although the beacon is off

The beacon is set to send Eddystone UID with -30dBm (~1m) and 200ms.

beaconManager.setForegroundScanPeriod(200, 0);

I know, that setRegionExitExpiration is only for monitoring. But why the app is receiving the data from beacon, even if I leaved the area or when the batteries are removed. This happens for exactly 20s seconds. In 0.16.0 the didn't received the data in this two cases.

I think there is a bug in sdk.

beaconManager.setEddystoneListener(new BeaconManager.EddystoneListener() {
                @Override
                public void onEddystonesFound(List<Eddystone> list) {
                    if (list != null) {
                        for (Eddystone eddystone : list) {
                            if (eddystone.instance.equals("eb5b8276f027")) {
                                Log.d(TAG, "onEddystonesFound: eb5b8276f027  is there!!!");
                            }
                        }
                    }
                }
}
08-09 08:39:07.838 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:08.078 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:08.460 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:08.634 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:08.858 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:09.098 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:09.342 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:09.578 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:09.812 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:10.048 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:10.283 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:10.520 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:10.865 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:11.063 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:11.315 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:11.537 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:11.807 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:12.017 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:12.263 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:12.516 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:12.792 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:12.979 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:13.234 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:13.460 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:13.702 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:13.942 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:14.167 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:14.400 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:14.638 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:14.888 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:15.137 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:15.358 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:15.597 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:15.834 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:16.072 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:16.359 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:16.574 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:16.808 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:17.052 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:17.288 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:17.528 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:17.769 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:18.036 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:18.249 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:18.489 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:18.693 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:18.941 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:19.168 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:19.407 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:19.647 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:19.898 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:20.128 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:20.368 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:20.608 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:20.856 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:21.084 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:21.319 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:21.529 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:21.797 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:22.010 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:22.252 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:22.487 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:22.733 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:23.012 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:23.210 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:23.449 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:23.697 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:23.929 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:24.129 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:24.386 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:24.612 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:24.849 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:25.103 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:25.347 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:25.544 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:25.796 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:26.014 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:26.256 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:26.500 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:26.730 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:26.971 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:27.208 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:27.498 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:27.698 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:27.941 D: onEddystonesFound: eb5b8276f027  is there!!!
08-09 08:39:28.197 D: onEddystonesFound: eb5b8276f027  is there!!!

at 08:39:08 I removed the batteries of a beacon and as you can see, the data are still incoming for exactly 20s.

Sharprender commented 7 years ago

I just switched to 0.16.0 and found some strange behavior: I commentedthis line

//beaconManager.setRegionExitExpiration(1000);

and onEddystonesFound event is invoked for next 20s although the batteries were removed from beacon. I uncommented the line

beaconManager.setRegionExitExpiration(1000);

and now, the onEddystonesFound doesn't invoked after I removed the batteries.

So: in 0.16.0 setRegionExitExpiration setting was affecting the behavior of EddystoneListener! and in 1.0+ anymore. I've tried it on the same device with the same app.

It could be very usefull to make a function like setEddystonesFoundExpiration in 1.0+ version!