Estimote / Android-Fleet-Management-SDK

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

onExitedRegion is NEVER called #273

Closed sbrkx closed 5 years ago

sbrkx commented 6 years ago

Hey all, we currently heavily rely on the Estimote Android SDK and are not able to quickly replace our approach with the latest Proximity SDK. So we really need a fix from your side.

Please reproduce this bug by using the original Estimote Tutorial Project Test application (e.g http://developer.estimote.com/android/tutorial/part-1-setting-up/). I just applied a log to "onEnteredRegion" which also creates the notifcation and also "onExitedRegion".

The "onEntered" event always fires as expected, the notification and log entry shows up. However, the "onExited" event is never called which also prevents new enter events to appear.

We spent a lot of time playing around with "setRegionExitExpiration" and "setForegroundScanningPeriod" and "setBackgroundScanningPeriod" while also testing through every SDK version from the latest 1.4.1 to 1.0.11. The last version which relibily works is indeed 1.0.11 leaving us far behind for those other bug fixes until then.

So could you please investigate this issue and fix this in another maintenance release?

Thanks Steve

dextreem commented 6 years ago

Hi sbrkx,

I observe the same effect, but only using Oreo 8.0 (Nougat and 8.1 not tested). The "funny" part: onExitRegion gets called right after entering another region (I defined a separate region for each of my 3 beacons). The same code works fine for Android 6.0, tested on the same (!) device, so I assume it's an Oreo issue, maybe because of the tighten restrictions? Could you confirm my observations?

we currently heavily rely on the Estimote Android SDK and are not able to quickly replace our approach with the latest Proximity SDK

Do you know for sure if using Proximity SDK would fix the problem? Since I'm at a rather early phase of development, this would be an option for me...

BR, Dominic

sbrkx commented 6 years ago

Hi Dominic, thanks for your quick reply. I can confirm what you discovered: onExitedRegion gets called on Android 7 (API: 24; Samsung Galaxy S7) with the latest SDK without any problem. We were indeed testing using Oreo 8.1; we assume that it has nothing to do with the tightened restrictions because the exact same code words under Estimote SDK 1.0.11 with Oreo 8.1 - could you test the 1.0.11 as well with your setup? The Exit callback must get called automatically if you flip the beacon.

Yes, simply because the current production SDK is deprecated and will not be developed any further. Estimote says the new SDK will be more compliant across devices and Android platforms, so I would suggest you to take a look at it if you are in an early phase of development.

Best Stefan

dextreem commented 6 years ago

Hi Stefan,

could you test the 1.0.11 as well with your setup?

Sure. And... voilà: I can reproduce your issue. It works fine for 8.0 and 1.0.11, while 1.4.0 behave as described.

Yes, simply because the current production SDK is deprecated and will not be developed any further. Estimote says the new SDK will be more compliant across devices and Android platforms, so I would suggest you to take a look at it if you are in an early phase of development.

Thanks for your information, I'll give it a try.

BR Dominic

sbrkx commented 6 years ago

Any updates @estimote?

heypiotr commented 5 years ago

[Cleaning up stale issues following the rebranding of Estimote SDK to Estimote Fleet Management SDK]

For enter/exit events, we're asking developers to migrate to our Proximity SDK:

https://developer.estimote.com/proximity/android-tutorial/

If you need any help with the migration, let us know on our forums:

https://forums.estimote.com