[G 2014 General] Duck86:
Tasker​

I shall go through battery saving techniques using Tasker first, because it is a straightforward install via the Play store and does not require the Xposed Framework. For this section of the guide all steps are the same whether you are running KItKat or Lollpop.

Tasker is an awesome app and hugely useful for many things within android. The basic principle is that it will automate many tasks for you based around parameters that you set, such as time, phone state, applications launched etc.

Once you have Tasker installed, you should head back to the play store and install ‘Secure Settings’, which is an extra plugin and adds even more functionality to Tasker. Then you need to head to Settings > Security > Device Administrators and ensure the Tasker box is checked.

Now you can open the Tasker app and you shall see this screen:

​

For the purposes of this tutorial we shall just be using the ‘Profiles’ and ‘Tasks’ tabs. The Task is what you want to happen, and the Profile is when you want it to happen.

We shall start by creating a task to set the phone to go automatically into airplane mode at night. This is a great battery saver if, like me, you don’t turn off your phone at night. I shall go through this task in detail so you get a feel for the UI. Then I’ll type the same tutorial out in shorthand. All the rest of the profiles will be done in this way.

Airplane Mode At Night:

1In the profiles tab, hit + at the bottom of the screen.

2Enter new profile name. I called this one ‘Airplane Mode At Night’ *

* If Tasker does not automatically ask you to name your profile directly after hitting '+', on the profiles screen, hit the menu button (3 dots in top right) and select Preferences > Main Screen > Check the box that says 'Ask for new profile name'. That will fix it so that the order in this tutorial is correct.

3Select ‘Time’

4Choose the time you wish airplane mode to start in the ‘from’ section, and choose the time you wish airplane mode to finish in the ‘to’ section. Leave the ‘repeat’ checkbox blank.

​

5To save, you must press the Tasker icon in the top left of the screen. This will bring you back to the main screen with a popup menu.

6Select ‘New Task’ and call the task ‘Airplane Mode On’

7This will bring you to another new screen, once again, click the + at the bottom of the screen.

​

8A new menu will pop up, ‘Select Action Category’. Go ahead and press ‘Plugin’ > ‘Secure Settings’.

​

9 You will now be in the ‘Action Edit’ Screen. This allows you to set parameters for this particular Action. Click the Pencil icon beside ‘Configuration’. This will open up the secure settings screen.

​

10Under ‘Root Actions’ Click ‘Airplane Mode’ and select ‘On’. Then save. You will automatically be taken back to the ‘Action Edit’ screen. Save this task as you did before, by clicking the Tasker icon on the top left of the screen.

​

11Now, you are almost done. But first, you need to create an exit task for the profile. That way Tasker knows to revert back to normal mode at the exit time.

12Under the Profiles Tab find your profile and click it once to expand it out. Long press on the ‘Airplane Mode On’ task and then choose ‘Add Exit Task’. Call your exit task ‘Airplane Mode Off’

​

13Now you are going to go through steps 7 to 10 again, but instead of selecting Airplane Mode ‘on’, you are going to select ‘off’. When you are finished, save your exit task. That’s it! You have created your first Tasker Profile. You can toggle this profile on/off from the profiles tab, so if there’s a particular night you might be expecting a call you can turn it off.

​

Shorthand:

WiFi Off At Night:

Now for the next Battery Saver Tasker Profile, WiFi Off At Night. Before Tasker I often would forget to turn off my WiFi before I went to sleep, and if I was somewhere without my charger this could be a real battery drain for me overnight.

On that profile I added an extra qualifier, to do this create ‘Time’ first and save it. Then create your task, the same as you did on the previous tutorial. Once your task is created and saved, you can go back and long press on time in the profile and click ‘Add’. It is inverted because I am telling Tasker that as long as the time is between 0000 and 0800 and these applications are NOT running, it is ok to turn off the WiFi. You can configure these apps whatever way you like, this is just what suits me, because I might often be using my phone as an XBMC remote after midnight and I need my WiFi connection for that. Alternatively I might be reading, in which case Moon Reader syncs my page position to Google Drive so all my devices have the same location for whatever book I am reading.

Screen Off With Periodic Data/WiFi:

This profile saves a lot of battery by only having data, WiFi and sync switched on when you need it, i.e. When the screen is on. If the screen is off it will automatically turn off connectivity, but will still periodically re-enable it for background notifications such as email and Viber etc.

This is quite a complicated one to roll into one single profile, so, to make it easier I have split it into five separate profiles. Other people may suggest other ways of doing this, feel free to do so. (If a better way is suggested that is just as easy for noobs I’ll change this post to include it and give the poster credit).

This last profile has many actions in it. You can test out more complicated profiles by pressing the play button in the bottom left of the screen. I have set this up so that it will turn on WiFi first and sync my notifications (Viber, Email etc) for 30 seconds, then if I am out and about and there is no WiFi it will also turn on mobile data for 30 seconds.

* Use the same task that you created earlier to save on doubling up on tasks

** You can set this to repeat however often you like, but bear in mind that the shorter the repeat interval, the less effective it will be at saving battery life.

For other Tasker tutorials and profile ideas, please see these links:

HollywoodFrodo Tasker Tutorial Series

Pocketables Tasker Tutorials

TechSplurge 15+ Awesome Tasker Profiles