Page 1 of 1

how to set time zone

Posted: 29 Dec 2015 19:34
by wildfire
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!

Re: how to set time zone

Posted: 29 Dec 2015 19:59
by Martin
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

Re: how to set time zone

Posted: 29 Dec 2015 21:29
by wildfire
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!

Re: how to set time zone

Posted: 29 Dec 2015 22:04
by MURTUMA
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.