Android How to use Tasker and make this sample automatic task ?

Status
Not open for further replies.

raksrules

Oracle
I recently rooted my nexus 7 and have installed Tasker app in it. I have read it can be used to automate lot of stuff in the device.
For starters I want a functionality that whenever my tablet's battery capacity drops to 10% or below then the tablet should shut off.
I did try something yesterday but seems it did not work. Can anyone help ?
 
I maybe able to help you better if you can tell me the purpose of doing this. :)
The simplest way to do this is as follows:
Open Tasker> Press + button> Select State> Power> Battery level> from 10 to 10
New Task> give a name> click on + button> Misc> Reboot> type- shutdown
This will work once you give root permissions to tasker in your root permissions app.
The drawback with this method is, if you try to turn on the tablet while the battery level is still 10% it will turn off again in few seconds after turning on. But since the startup will take some battery, the battery level is bound to change to 9% most probably, so shouldn't be a problem in most cases.
If you don't want this drawback, the way to do it will be a bit more complex.
 
  • Like
Reactions: raksrules
I just want that as soon as tablet'a battery touches 10% it should shut off. Doesn't matter if any process is running or tablet is locked. It should just shutoff.
About the thing you told that it might shut off almost immediately after I restart at same 10% battery level then tasker may swing into action and shut off tablet again. In this case, can u restart the tablet and immediately go to tasker and disable the task or something like that ?
 
You can do it most probably, because it takes sometime for tasker and importantly root permissions to get initiated so you'll have enough time(I suppose). By any chance if you fail, the battery life will definitely fall down with next turn on :-P
 
I maybe able to help you better if you can tell me the purpose of doing this. :)
The simplest way to do this is as follows:
Open Tasker> Press + button> Select State> Power> Battery level> from 10 to 10
New Task> give a name> click on + button> Misc> Reboot> type- shutdown
This will work once you give root permissions to tasker in your root permissions app.
The drawback with this method is, if you try to turn on the tablet while the battery level is still 10% it will turn off again in few seconds after turning on. But since the startup will take some battery, the battery level is bound to change to 9% most probably, so shouldn't be a problem in most cases.
If you don't want this drawback, the way to do it will be a bit more complex.

Wow this worked. I tried it yesterday night and my nexus's battery was already at 15% or so. I setup the task exactly as mentioned by you and for 10% battery level. I played a video on full brightness just to let the juice out soon. And at 10% the tablet shut off.
It doesn't even give any "shutting off" or any message, just screen goes blank and shuts off. Not that I have a problem with it.
But it worked perfectly.

Seems I have to play around with this tasker to understand it more. Thanks for this.
 
  • Like
Reactions: artikle
Just before your shut down task, add one more step by selecting alert option and popup. Here you can enter some useful information like it will shutdown soon... So it will execute this popup message for some time depends on the timing setup. In this way you can have control over the task execution.
 
Just before your shut down task, add one more step by selecting alert option and popup. Here you can enter some useful information like it will shutdown soon... So it will execute this popup message for some time depends on the timing setup. In this way you can have control over the task execution.

Yup let me play around with this. Thanks.
 
Wow this worked. I tried it yesterday night and my nexus's battery was already at 15% or so. I setup the task exactly as mentioned by you and for 10% battery level. I played a video on full brightness just to let the juice out soon. And at 10% the tablet shut off.
It doesn't even give any "shutting off" or any message, just screen goes blank and shuts off. Not that I have a problem with it.
But it worked perfectly.

Seems I have to play around with this tasker to understand it more. Thanks for this.
Glad that it worked :) If you want to delay it by a few seconds you can do as @smnrock suggested and add a flash and a delay. To to this, the procedure is as follows:
in the task you already created, press + button> alert> flash>type the message you want like "shutting down"
In the task you already created, press + button>task>wait>set required wait time like 30secs or whatever

Now the important thing is these flash and wait actions should be placed above the reboot action. So reorder the actions by holding and dragging the lightning bolt symbol beside the action name so that the order is flash-wait-reboot.
 
  • Like
Reactions: raksrules
@artikle

Need your help again. I tried but failed.
Need to shut off phone at particular time of the day. How do I create such a task ?
Say 0600pm daily shut off the phone
 
@artikle

Need your help again. I tried but failed.
Need to shut off phone at particular time of the day. How do I create such a task ?
Say 0600pm daily shut off the phone
Hi! I'm outlining the easiest way that should work normally below, but I'm unable to test it because I let go of my Note 2 and bought a Sony Z2 yesterday so it will take a couple of days before I root it.
Press + button > Time > From: 18:00 to 18:00
Name the new task > Misc > Reboot > Shutdown
Let me know if it works.
 
Last edited:
Yes it is a different device.
If the device says root permissions granted at said time, then it means that the device has some problem with the shutdown function of tasker... Which means even the battery percent profile you setup earlier won't work on this device... May I know which device it is?
 
If the device says root permissions granted at said time, then it means that the device has some problem with the shutdown function of tasker... Which means even the battery percent profile you setup earlier won't work on this device... May I know which device it is?
HTC Thunderbolt with ICS Rom, I have no further idea what modded rom it is and any such thing. But I know It is rooted for sure.
 
HTC Thunderbolt with ICS Rom, I have no further idea what modded rom it is and any such thing. But I know It is rooted for sure.
I guess it is due to incompatibilities between ICS or phone with current tasker. I don't think there is much that can be done but let's try a few things:
Install Secure Settings from play store
Now setup everything as before, but find the Plugin category in actions instead of Misc. In the Plugin option select secure settings and find the reboot or shutdown option in that. Before this can work, you need to enable secure settings from its app and give device administrator rights to it which it will ask you for. Please try and let me know.... But I have a feeling only reboot works on.this phone / ROM and shutdown won't.
 
Status
Not open for further replies.