Estimote / Android-Fleet-Management-SDK

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

SecureRegion only works when UUID, Major and Minor are all null? #127

Closed emaddoma closed 9 years ago

emaddoma commented 9 years ago

Perhaps I'm doing this wrong, but I can't monitor a SecureRegion when I specify any of the three parameters.

beaconManager.startMonitoring(new SecureRegion("One", UUID.fromString("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"), 100, 18800)); // this does not work
beaconManager.startMonitoring(new SecureRegion("Two", UUID.fromString("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"), 100, null)); // this does not work
beaconManager.startMonitoring(new SecureRegion("Three", UUID.fromString("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"), null, null)); // this does not work
beaconManager.startMonitoring(new SecureRegion("Four", null, null, null)); // this works
emaddoma commented 9 years ago

So it appears the flip mode interferes with beacon monitoring. I turned it off and was able to see my beacons just fine. Incidentally, I've found flip mode to be very inconsistent and problematic on iOS as well, but not this bad. Seems like you guys need some QA.

wiktor commented 9 years ago

Can you elaborate on that?

1/ "flip mode" - do you mean Flip To Sleep mode? When beacon is upside down is stops broadcasting? 2/ How was looking your setup?

emaddoma commented 9 years ago

Yes, Flip to Sleep mode was suspect. I turned off Flip to Sleep and began seeing entry and exit events in my app. Then they disappeared again, so I jacked the setBackgroundScanPeriod up to once per second for both scan and wait and they came back. Now I'm trying Flip to Sleep mode again to see if it wasn't the setBackgroundScanPeriod defaults.

emaddoma commented 9 years ago

So it seems it wasn't the Flip to Sleep mode. The default background scan period is not working for me at all, though. Setting it to a rather frequent value (1 seconds scanning, 6 waiting) seems to be the only way I get reliable entry and exit events on my device (Nexus 5). A waiting period of any longer than 8 seems to render the SDK useless.

wiktor commented 9 years ago

We will be tomorrow releasing SDK with probable fix to your issue. I'll notify this ticket once it is done.