Lollipop: Toggling "Battery saver" when not charging

779 views
Skip to first unread message

Elias Pinto

unread,
Nov 29, 2014, 12:48:31 PM11/29/14
to tas...@googlegroups.com
My Nexus 4 just received Lollipop this week.

Any N4 owner knows the battery is the Achilles heel of this phone.

Lollipop (finally) introduced a built in "Battery saver" mode that can extend the battery a SURPRISING long time.

Owners of phones with bad batteries (like me) need a Tasker Action that turns on Battery Saver so it can be enabled way before the built in 5 or 15%, or it can be enabled whenever it is not charging.

Yes there are background data sync considerations to be aware of, but having a dead phone battery outweighs the costs.

Is this possible with the Lollipop API?

Thanks gurus.

Marta Hintz

unread,
Nov 29, 2014, 1:19:21 PM11/29/14
to tas...@googlegroups.com
If not then use autoinput plugin.

Elias Pinto

unread,
Nov 29, 2014, 5:23:29 PM11/29/14
to tas...@googlegroups.com

I did look through the current Tasker options and actions. Nothing there to enable "Battery Saver".

Idk about the autoinput plugin, I'll look into it.

But I have a hunch that Tasker may need to have that type of action added.

On Nov 29, 2014 1:19 PM, "Marta Hintz" <lar...@gmail.com> wrote:
If not then use autoinput plugin.

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/y6phG_cc10A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

John Doe

unread,
Nov 30, 2014, 3:15:17 AM11/30/14
to tas...@googlegroups.com
It's not possible because Lollipop doesn't provide any API to do it. Maybe it would be possible with root access and maybe you could ask for example to secure settings plugin forum for this feature, I'm sure it will add support for it but only for root however.

Marta Hintz

unread,
Nov 30, 2014, 12:53:08 PM11/30/14
to tas...@googlegroups.com
Again that is why you use auto input when you don't have root and you need a button pushed that shows on a screen.

Elias Pinto

unread,
Nov 30, 2014, 3:39:51 PM11/30/14
to tas...@googlegroups.com

Awesome. Thanks Marta and John. Hope you had a great Thanksgiving.

Sent from an Android

On Nov 30, 2014 12:53 PM, "Marta Hintz" <lar...@gmail.com> wrote:
Again that is why you use auto input when you don't have root and you need a button pushed that shows on a screen.

SireeBob Bobsworth

unread,
Mar 9, 2015, 11:18:13 PM3/9/15
to tas...@googlegroups.com
There is a better answer.

Get the Secure Settings app and use its plugin within a task. Action > Device Setting > global > low_power
Value of 1 is on, 0 is off. The System UI recognizes the change immediately.

Darijo Gospić

unread,
Mar 10, 2015, 5:41:42 PM3/10/15
to tas...@googlegroups.com
It's a premium feature, before buying I'd like to know do you need root for this?
For activating battery saving mode, Value should be set to 1 , and to turn it off to 0?
Also using Nexus 4 stock lollipop, not rooted 

John Doe

unread,
Mar 11, 2015, 3:13:27 AM3/11/15
to tas...@googlegroups.com
Writing a global setting can be easily done using java code inside Tasker without any plugin.

Darijo Gospić

unread,
Mar 11, 2015, 6:35:32 AM3/11/15
to tas...@googlegroups.com
Could you please instruct us how to do it?

Pent

unread,
Mar 13, 2015, 3:50:13 AM3/13/15
to tas...@googlegroups.com


Writing a global setting can be easily done using java code inside Tasker without any plugin.

It needs the WRITE_SECURE_SETTINGS permission, which isn't granted to a normal app
I'm pretty sure.

Pent

John Doe

unread,
Mar 13, 2015, 8:24:17 AM3/13/15
to tas...@googlegroups.com

It was a general suggestion about a general setting, so I don't know if it's applicable in this case. I don't know the specific setting because I don't use lollipop, when I'll do the upgrade I'll see. However I think using root there isn't any problem (maybe).

Jerry Lange

unread,
Apr 3, 2015, 3:27:40 PM4/3/15
to tas...@googlegroups.com
Thanks so much for this! I'm guessing setting it to 0 disables it? that seemed to disable it. The strange thing is though when you enable this automatically via secure settings and then go to check battery stats it still shows as balanced under the battery info. maybe i checked too fast? I checked right away. Obviously its on battery saver mode because the orange nav bar. 

Darijo Gospić

unread,
Apr 5, 2015, 3:33:56 PM4/5/15
to tas...@googlegroups.com
You used Secure settings to turn it on? or java scripts? 
Reply all
Reply to author
Forward
0 new messages