Today, I’m going to show you how to toggle Android Lollipop’s built-in Battery Saver mode to create a “Tasker Battery Saver Mode” that can be toggled on and off at will. I’m also going to pair it with a cool app called Power Toggles to create a custom widget in the notification shade.
In order to set up our Tasker Battery Saver mode, you need to first install Tasker if you haven’t already. We also need to install Power Toggles. Your phone needs to be rooted! This task will NOT work without root!
In addition, you’ll need to go into Preferences in Tasker. Under the Misc tab, check the “Allow External Access” box.
Tasker Battery Saver Mode Task
The first thing we want to do is create our task in Tasker. I’ll start by showing a screenshot of my task and then I’ll explain it.
As you can see, this is a pretty short task! Only 7 actions needed! When we toggle our Tasker Battery Saver mode on using Power toggles, actions 5 and 6 are executed. When we toggle it off, actions 2 and 3 are executed.
There are a few important things to keep in mind here! First, on Action 1 (the If statement), the condition you want to set is “%state Isn’t Set”. Second, we need to make sure both “Run Shell” actions are run as root. To do that, just check the “Use Root” checkbox when you’re setting each action up. Third, you’ll find the “Modify PowerToggle state” action underneath Plugin > Power Toggles when adding the action.
Okay, now that we’ve got the Tasker task set up, we can move on to the next step.
Set up Power Toggles
Launch the Power Toggles app and select Notification. You’ll want to turn on the notification shade widget by turning the toggle on in the top right corner. You can then select Customize. On this screen, click the Add Toggle button. Select the Custom tab and then click “Tasker toggle”.
At this point, you’ll want to select your Tasker battery saver mode task. Leave the type as “Single icon”. As long as you select a nice built-in battery icon (like the one I have in my below screenshot), the icon will automatically darken when the battery saver mode is toggled on.
That’s really all there is to it! Hit Done and then pull down your Notification shade! Toggle your battery saver mode on and off with ease! You can apply the concepts learned here to create toggles for any Tasker task you can dream up!