how to set time zone

General discussions about Automagic and automation in general

Moderator: Martin

Post Reply
wildfire
Posts: 2
Joined: 29 Dec 2015 19:29

how to set time zone

Post by wildfire » 29 Dec 2015 19:34

I am looking for a way for Automagic to set the time zone to something other than the network-provided time zone when inside a specific app. The only variables I can find that might be able to set it are homecity_timezone and homecity_timezone_city. I also am looking for the right syntax to have a flow trigger while inside a specific app and another flow to trigger when not in that app (essentially, I want to automate turning something off inside the app, and turning it back off outside that app).

I am very new to Automagic and appreciate any help! Thanks!

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

Re: how to set time zone

Post by Martin » 29 Dec 2015 19:59

Hi,

Changing the timezone requires a special permission that is only granted to system apps but not to a third party app like Automagic. I'll add it to the todo-list to add a root action to change the timezone.

On an unrooted device you could launch the settings app and use action Control UI to simulate clicking buttons.

Regards,
Martin

wildfire
Posts: 2
Joined: 29 Dec 2015 19:29

Re: how to set time zone

Post by wildfire » 29 Dec 2015 21:29

Thanks!

New question: I have a flow that starts on App Task Started. I want that flow to run only once, and open a settings shortcut. I can get the flow to trigger and open the settings shortcut, but as soon as I leave the settings and go back to the app, it triggers the flow again and sends me back to the settings shortcut. How do I specify that this should only happen once when the task is opened? So far scripting has not worked (I set a variable to 0, and the shortcut should only be launched when it's zero. After the shortcut is launched the variable is incremented, so by my logic it should not trigger again.)

I assume that the flow is being triggered again once the app gets focus back. How do I write a flow that only triggers once when the app is open?

Thanks!

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: how to set time zone

Post by MURTUMA » 29 Dec 2015 22:04

You could add [;]set flow state: disable[/;] action at the end of your flow and with another flow enable it again when the app closes.

Post Reply