Page 1 of 1
Pls add reboot trigger
Posted: 16 Apr 2014 06:12
by akhileshg1988
Adding the Reboot trigger shall prove quite useful.
Actually, I want certain apps installed on my device to start/run on phone startup, which is why I am requesting the feature "Reboot trigger" to be added.
Thanks
Re: Pls add reboot trigger
Posted: 16 Apr 2014 14:03
by munhozdiego
While there is no trigger for rebooted, you can easly implement one following this:
Trigger: Anything you want will do, ex.: Time Based, screen off, every X minutes
Action: Execute Root Command - uptime
Script: global_IsRebooted = substring ({stdout},12,14)
Condition: expression - IsRebooted < 1
if true - do whatever you want here using a action
What is gona do:
When your trigger is activated it will execute uptime, this command will deliver cellphone uptime since last reboot. Then it will check if this time is inferior to 1 minute, if true phone was rebooted and your action will be executed.
Execing this trigger when screen is off looks like the best option in this scneario.
Re: Pls add reboot trigger
Posted: 16 Apr 2014 21:58
by ZSasha
I think the dev version alread has uptime function so no needs to be root.
Re: Pls add reboot trigger
Posted: 17 Apr 2014 05:05
by akhileshg1988
Thanks, that helped.
Plus, may I know from where can I get a list of (1) all the root commands (2) all the scripts (3) various expressions.
Re: Pls add reboot trigger
Posted: 17 Apr 2014 05:12
by ZSasha
akhileshg1988 wrote:Thanks, that helped.
Plus, may I know from where can I get a list of (1) all the root commands (2) all the scripts (3) various expressions.
not quite sure what you mean. root commands are just commands that Android understand, it us not related to Automagic specifically. I would google first

about scripts - you actually WRITE a script (in terms of Automagic). Put a "script" block and hit the "function" button - it gives you a list of functions available you can use to make your script.
One think that I would really like to know as well and what kind of missing from automagic now - funtion's parameters list. I have to guess or try quite often what parameter should I pass to the function - is it a number, a string, a character?
Re: Pls add reboot trigger
Posted: 17 Apr 2014 15:38
by Nerey
There is trigger Automagic Startup
You can use it