Location detection entering/exiting only works once

Post your questions and help other users.

Moderator: Martin

Post Reply
windowns
Posts: 6
Joined: 10 Apr 2013 00:56

Location detection entering/exiting only works once

Post by windowns » 12 Apr 2013 19:44

So I've been playing around trying to get this flow (or these flows) working. Basically my goal is to get my location, if it's with range of my work then I want to Store Audio Values, Set ringer to vibrate, and then set my wall paper to something more "work appropriate". When I leave my work "area" then I want to Restore Audio Volumes and then change my wallpaper again.

Things work fine the first time around. But after that they don't work anymore. I can go into my location condition and click save, then re-run the flow and it runs down the appropriate path. I think something is wrong with the location condition for my phone.

I've tried this with two flows by setting up:

Periodic Location Update GPS 5m -> Location condition entering with GPS coordinates 200m radius -(true)-> Store Audio Volumes -> Set Ringer Mode: Vibrate -> Set wallpaper

Periodic Location Update GPS 5m -> Location condition exiting with GPS coordinates 200m radius -(true)-> Restore Audio Volumes -> Init random number n 1 to 10 -> Set wallpaper based on n

Then I tried one flow that was the first flow and on the location condition exiting returns false then i'd run the location condition exiting from flow number 2 up above.

I'd use the app Fake GPS to test my location being elsewhere. and it will work the first run of the flow. Then i'd have to go into the flow, open the location condition, then click "Save" and then the flow will function again.

In the "one flow" that I described in the second paragraph up above, I even tried a "Init location" action and still it wouldn't always work :(

Phone is an HTC One S with Android version 4.0.4

LightTempler
Posts: 53
Joined: 17 Mar 2013 16:08

Re: Location detection entering/exiting only works once

Post by LightTempler » 12 Apr 2013 21:40

No solution to the strange location trigger effect, but maybe helpfull to get thing done:

I don't use location as trigger for 'at work', I use connecting to our WLAN. Works great
and I don't need power consuming location services switched on.

windowns
Posts: 6
Joined: 10 Apr 2013 00:56

Re: Location detection entering/exiting only works once

Post by windowns » 12 Apr 2013 21:56

Yeah, i'm looking into using the wifi detection now. The trick is I don't want to connect my personal phone to the company wifi. And really I don't want to rely on the presence of the wifi access point, because sometimes it goes down. Thanks though for the idea. I am going to give this whole "wifi available" condition a run.

For what it's worth, I used the periodic location update all day yesterday at an interval of 5 minutes using "Network" as the type and it seemed to be battery friendly. My phone stayed up all day and well into the night when I normally plug it in. Of course because of the "issue" I mentioned here I don't know how accurate the "Network" location type really is.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Location detection entering/exiting only works once

Post by Martin » 13 Apr 2013 17:52

Perhaps you have only enabled the "Entering" checkbox in the condition. In this case, the condition will only be "true" once when the location was outside in the last check and the location of the current location is inside the area.
If you want the condition to be always "true" when the location is inside then you have to enable the "Inside" checkbox under "Accept every update".

windowns
Posts: 6
Joined: 10 Apr 2013 00:56

Re: Location detection entering/exiting only works once

Post by windowns » 15 Apr 2013 18:00

Yep, I do. The idea is that IF the first location detected "entering" it would know i'm at work and set my wallpaper, etc, appropriately. If that location condition fails (which might be because I already "entered" and haven't left, or I did leave the location, or the location was not available) then it would move onto a second location condition where it will check if I have "exited" the location. Both location conditions have the same GPS coordinates. The thing is it would work when I arrive at work, and when I leave for lunch. Then when I get back to work the "entering" location condition will return false even though i'm at my desk and I have "entered" the location area.

User avatar
bodyalive
Posts: 32
Joined: 07 Apr 2013 13:21

Re: Location detection entering/exiting only works once

Post by bodyalive » 16 Apr 2013 11:44

I've solved many location problems using Phone Cell GSM trigger.
It works! Try it out.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Location detection entering/exiting only works once

Post by Martin » 17 Apr 2013 11:56

Perhaps you could use condition Location Entering to distinguish between the entering/exiting cases instead of using two location conditions (the location condition has to internally track the inside/outside-states and might not work as expected when not all locations are sent to both location-conditions). This approach has also the advantage that you only have to configure one location-condition.

-trigger "Periodic Location Update"
-condition "Location" with both entering and exiting enabled
-->true: -condition "Location Entering"[/list]
----> true: -actions when entered
----> false: -actions when exited

Post Reply