Page 1 of 1

Location: Order of enter and leave events unreliable

Posted: 26 Sep 2014 20:11
by Triangulix
Hi

I'm using the Periodic Location Update trigger with several locations which do not overlap. In addition to the locations I need an "On Transit" state that is active when I'm outside of the known locations.

For example I want to switch between 3 states: Location A, On Transit and Location B.

When I move from location A to location B my phone sometimes ends up in the On Transit state because the event "enter location B" is triggered before the event "leave location A".

How could I ensure a clean transition betwen my states and a correct behavior of the On Transit state?

Michael

Re: Location: Order of enter and leave events unreliable

Posted: 27 Sep 2014 11:09
by Martin
Hi,

Could you share the flow(s) you are using? Is the state "On Transit" only active for a very short amount of time or does this state persist for a few minutes until the trigger detects the next location?
Does your device return extremely coarse grained locations at times? Maybe you could mitigate the problem by using the minimum accuracy in the trigger.

Regards,
Martin

Re: Location: Order of enter and leave events unreliable

Posted: 28 Sep 2014 21:23
by Triangulix
Martin wrote:Could you share the flow(s) you are using?
I could send you the file in private but I cannot make it publicly available since it contains the positions of everything in my daily life.
Is the state "On Transit" only active for a very short amount of time or does this state persist for a few minutes until the trigger detects the next location?
There are transitions that can happen in less than 5 minutes and there are also transitions with several hours of on-transit time.
Does your device return extremely coarse grained locations at times? Maybe you could mitigate the problem by using the minimum accuracy in the trigger.
Yes, I already do that. The minimum precision filter is a great tool to reduce the location jumping when the location service has its occational drop-out but the reversing order of the events is a different problem.

Michael

Re: Location: Order of enter and leave events unreliable

Posted: 29 Sep 2014 07:52
by Martin
Please send the flow(s) to info@automagic4android.com so I can take a look. Could you please also turn on Debug Log and Log to SD card until the problem occurs the next time so I can check the locations that the device detects.

Martin

Re: Location: Order of enter and leave events unreliable

Posted: 29 Sep 2014 16:31
by Triangulix
Martin wrote:Please send the flow(s) to info@automagic4android.com so I can take a look.
Done. :-)