Estimote / Android-Fleet-Management-SDK

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

Upgrading to latest version breaks telemetry discovery #212

Closed spapas closed 7 years ago

spapas commented 7 years ago

Hello, we have an application that is reading and reporting some telemetry values from an estimote beacon. When we were using the old version (0.16.1) the telemetry listener callback was called every second (when the telemetry values were reported from the estimote), check for example the output from android studio:

04-19 12:54:32.712 12542-12671/com.serafeim.beta V/EstimoteTlmTracker: ~~ LIGHT IS 11.52 ~~
04-19 12:54:33.743 12542-12671/com.serafeim.beta V/EstimoteTlmTracker: ~~ LIGHT IS 11.52 ~~
04-19 12:54:34.769 12542-12671/com.serafeim.beta V/EstimoteTlmTracker: ~~ LIGHT IS 11.52 ~~
04-19 12:54:35.789 12542-12671/com.serafeim.beta V/EstimoteTlmTracker: ~~ LIGHT IS 11.52 ~~
04-19 12:54:36.820 12542-12671/com.serafeim.beta V/EstimoteTlmTracker: ~~ LIGHT IS 11.52 ~~

After updating to the latest version 1.0.1 the telemetry readings are reported at more or less random intervals (which are way too big more than 1 minute) - check out the android studio output:

04-19 13:08:07.018 29541-29671/com.serafeim.beta V/EstimoteTlmTracker: ~~ LIGHT IS 10.799999999999999~~~
04-19 13:10:22.029 29541-29671/com.serafeim.beta V/EstimoteTlmTracker: ~~ LIGHT IS 5.76~~~
04-19 13:12:08.920 29541-29671/com.serafeim.beta V/EstimoteTlmTracker: ~~ LIGHT IS 12.959999999999999~~~
04-19 13:13:02.146 29541-29671/com.serafeim.beta V/EstimoteTlmTracker: ~~ LIGHT IS 14.399999999999999~~~
04-19 13:14:12.179 29541-29671/com.serafeim.beta V/EstimoteTlmTracker: ~~ LIGHT IS 14.399999999999999~~~

Please notice that I've set a foreground scan period of 1 second:

beaconManager.setForegroundScanPeriod(1000, 1000);

Do you maybe know what's the problem? It is important to our application that the telemetries are reported as quickly as possible!

pawelDylag commented 7 years ago

Hello @spapas

Previous behaviour was wrong. As I explained to you some time ago, TLM readings are split into three different packets (a lot of data from sensors) and our SDK needs to merge them internally. So your old readings, as you may carefully noticed, are just duplicated TLM readings from cache, not from real beacon. There is no value from getting duplicated TLM every second - no data changes at all. Since version 1.0.1 same TLM packets are being reported only once. The whole bug was reported here: https://github.com/Estimote/Android-SDK/issues/187 I am closing this issue, because the new behaviour is the proper one.

spapas commented 7 years ago

Hello @pawelDylag ok I'll test the behavior you describe and come back with any more info. Thanks!