UPDATE: Location control v3.0

Share and discuss your flows and ideas with other users.

Moderator: Martin

rokahaal
Posts: 25
Joined: 05 Jul 2014 12:03

UPDATE: Location control v3.0

Post by rokahaal » 29 Sep 2014 23:17

OK guys BIG update here: Location control v3.0

Features:

- fully compatible with android 5.x lollipop (please note: it is only working with android 5!)

- activate location services (network, gps and wlan) when you start/open a gps app

- deactivate location services after 10 seconds after you closed the gps app

- location services will stay active when a selected gps app is running and you turn off display (you are able to use a running google maps navigation with display off!)

- periodic location update (might be useful for widgets like cyanogenmods cLock which shows your actual location)

- activate location services by sending you a message which contains a codeword choosen by yourself (so you can use security apps like google location manager to find, track, erase or lock your phone)

- notification in statusbar when you manually activate location services an no gps app is running; you can deactivate location services by clicking the action

- update location automtatically after a reboot/restart

- available in german and english

Instructions:

- update automagic to the newest version

- open automagic go to manage - preferences - and check "Hide setting confirmation"

- download the flows and import them

- open flow "Activate location services with notification" (German "Standortdienste aktivieren durch eine Benachrichtigung") and then you have to set a codeword by your own choice in both triggers; when you send a message to your phone (sms, whatsapp, gmail) which contains your codeword (in gmail codeword in subject) the location services will be activated

- activate all flows except flow "Set location services off after receiving notification" (German "Standortdienste nach Aktivierung mit SMS wieder deaktivieren")

To change the gps apps do the following steps:

- open flow "Set location services on" ("Standortdienste an")

- open trigger "Gps app active" and chosse your apps and then press save

- open flow "Set location services off" ("Standortdienste aus")

- open trigger "gps app off" and choose your apps and then press save

- open in this flow condition "gps app active" and choose your apps an press save and click "all usages"

Please Note:

I am working with notifications in statusbar and they got the notification ID 16 and 19. Please check if you are using this IDs in other flows. If so you should change the notification IDs.

To change your gps apps which will let location services active when you shut off display open flow "Set Location Services off" and then open condition "App process running" and choose your navigation/gps app and press save. I have set Google Maps, Nokia Here and Navfree by default in this flow.

The periodic update timer ist set to 4 hours by default, You can change this in the trigger in flow "Periodic location update with high accuracy"

Have fun :D
Attachments
flow_group_Location_control_v3_0_german.xml
(48.29 KiB) Downloaded 1659 times
flow_group_Location_control_v3_0_english.xml
(47.1 KiB) Downloaded 1964 times
Last edited by rokahaal on 28 Jun 2015 20:41, edited 6 times in total.

User avatar
kintrupf
Posts: 257
Joined: 10 Sep 2013 08:59

Re: Location control v2.0

Post by kintrupf » 30 Sep 2014 12:35

Thank you for the hint with the Xposed module! I was wondering where those force closes suddenly came from... ;-)

User avatar
zaini47
Posts: 18
Joined: 30 Jul 2014 01:14

Re: Location control v2.0

Post by zaini47 » 06 Oct 2014 22:00

Great work!

XenopuS
Posts: 1
Joined: 28 Oct 2014 10:19

Re: Location control v2.0

Post by XenopuS » 28 Oct 2014 10:22

Good work!! How to easly change the gps apps in all flows?!? Ty

daerias
Posts: 8
Joined: 12 Feb 2014 05:48

Re: Location control v2.0

Post by daerias » 29 Oct 2014 19:18

great work! thanks!

rokahaal
Posts: 25
Joined: 05 Jul 2014 12:03

Re: Location control v2.0

Post by rokahaal » 31 Oct 2014 20:30

XenopuS wrote:Good work!! How to easly change the gps apps in all flows?!? Ty
Thank you. (and all the others :D)

To answer your question, I've edited the OP. Please take a look.

Randy Watson
Posts: 13
Joined: 14 Jan 2015 14:18

Re: Location control v2.0

Post by Randy Watson » 20 Jun 2015 02:13

Love your flow but I'm getting an error with this flow on lolipop......any idea on how to rectify this.
Thanks for providing this BTW.


20.06.2015 12:07:45.469 [GPS Wifi off] Flow ended.
20.06.2015 12:07:47.106 [GPS Wifi off] Starting to execute flow 'GPS Wifi off' with Context{global{},local{flow_name=GPS Wifi off,trigger=Display State: Off,triggertime=1434766067100}}
20.06.2015 12:07:47.106 [GPS Wifi off] Start executing condition 'Screen On'
20.06.2015 12:07:47.109 [GPS Wifi off] End executing condition 'Screen On' with return value false
20.06.2015 12:07:47.111 [GPS Wifi off] Flow continues executing with the next step.
20.06.2015 12:07:47.111 [GPS Wifi off] Start executing condition 'GPS App running in background'
20.06.2015 12:07:47.112 [GPS Wifi off] End executing condition 'GPS App running in background' with return value false and exception Condition can only check the topmost app on 5.0 (Lollipop, API 21)
20.06.2015 12:07:47.114 [GPS Wifi off] Flow ends execution due to errors
20.06.2015 12:07:47.115 [GPS Wifi off] Error:
ch.gridvision.ppam.androidautomagiclib.util.q: Condition can only check the topmost app on 5.0 (Lollipop, API 21)
at ch.gridvision.ppam.androidautomagic.c.b.h.c(SourceFile:223)
at ch.gridvision.ppam.androidautomagic.c.b.h.a(SourceFile:118)
at ch.gridvision.ppam.androidautomagic.c.c.e.a(SourceFile:632)
at ch.gridvision.ppam.androidautomagic.c.c.e.b(SourceFile:935)
at ch.gridvision.ppam.androidautomagic.c.c.e.a(SourceFile:56)
at ch.gridvision.ppam.androidautomagic.c.c.e$1.run(SourceFile:750)
at android.os.Handler.handleCallback(Handler.java)
at android.os.Handler.dispatchMessage(Handler.java)
at android.os.Looper.loop(Looper.java)
at android.app.ActivityThread.main(ActivityThread.java)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.ja

rokahaal
Posts: 25
Joined: 05 Jul 2014 12:03

Re: Location control v2.0

Post by rokahaal » 27 Jun 2015 21:14

Randy Watson wrote:Love your flow but I'm getting an error with this flow on lolipop......any idea on how to rectify this.
Thanks for providing this BTW.


20.06.2015 12:07:45.469 [GPS Wifi off] Flow ended.
20.06.2015 12:07:47.106 [GPS Wifi off] Starting to execute flow 'GPS Wifi off' with Context{global{},local{flow_name=GPS Wifi off,trigger=Display State: Off,triggertime=1434766067100}}
20.06.2015 12:07:47.106 [GPS Wifi off] Start executing condition 'Screen On'
20.06.2015 12:07:47.109 [GPS Wifi off] End executing condition 'Screen On' with return value false
20.06.2015 12:07:47.111 [GPS Wifi off] Flow continues executing with the next step.
20.06.2015 12:07:47.111 [GPS Wifi off] Start executing condition 'GPS App running in background'
20.06.2015 12:07:47.112 [GPS Wifi off] End executing condition 'GPS App running in background' with return value false and exception Condition can only check the topmost app on 5.0 (Lollipop, API 21)
20.06.2015 12:07:47.114 [GPS Wifi off] Flow ends execution due to errors
20.06.2015 12:07:47.115 [GPS Wifi off] Error:
ch.gridvision.ppam.androidautomagiclib.util.q: Condition can only check the topmost app on 5.0 (Lollipop, API 21)
at ch.gridvision.ppam.androidautomagic.c.b.h.c(SourceFile:223)
at ch.gridvision.ppam.androidautomagic.c.b.h.a(SourceFile:118)
at ch.gridvision.ppam.androidautomagic.c.c.e.a(SourceFile:632)
at ch.gridvision.ppam.androidautomagic.c.c.e.b(SourceFile:935)
at ch.gridvision.ppam.androidautomagic.c.c.e.a(SourceFile:56)
at ch.gridvision.ppam.androidautomagic.c.c.e$1.run(SourceFile:750)
at android.os.Handler.handleCallback(Handler.java)
at android.os.Handler.dispatchMessage(Handler.java)
at android.os.Looper.loop(Looper.java)
at android.app.ActivityThread.main(ActivityThread.java)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.ja
Please check the OP. I have changed the flows to work with android 5. Please download the new version and try again.

ZSasha
Posts: 103
Joined: 11 Oct 2013 03:48

Re: UPDATE: Location control v3.0

Post by ZSasha » 16 Jul 2015 23:02

hm... could you please describe your flow - what is it for, use case? :)

thanks

rokahaal
Posts: 25
Joined: 05 Jul 2014 12:03

Re: UPDATE: Location control v3.0

Post by rokahaal » 17 Jul 2015 12:00

ZSasha wrote:hm... could you please describe your flow - what is it for, use case? :)

thanks
I don't want that the location services are switched on and active all the time in background. Without any control by me. I just want to switch on location services and GPS when I really need it. If I need Google maps navigation or Google maps nearby for example. But after that I want to switch off the location services again.

I just personally feel better, if it's under my control, when location services are switched on or off.

Probably this feeling is just placebo but I want to attempt everything I can to control my own data. And of course I have switched off Location reporting & history to Google generally on all my devices.

Post Reply