1

Is it possible to turn ON/OFF power saving mode from code?

For the time being, I do wakelock acquire and release, but I assume, that is not the same.

Cœur
  • 37,241
  • 25
  • 195
  • 267
MartinC
  • 546
  • 11
  • 26

1 Answers1

5

There aren't any publicly available API's to do this in the SDK. You can use the PowerManager to acquire and release wakelocks but that's about it. Besides, every manufacturer and device might have it's own version of what it means by "power saving mode", so it doesn't make sense to give 3rd party app developers an API to interact with the system in this way.

Anup Cowkur
  • 20,443
  • 6
  • 51
  • 84
  • thank you, that makes sense to me. Does that also mean that is not possible to read the power saving state either? – MartinC Sep 04 '13 at 11:00
  • Right. Hypothetically, Some phones may say that turning off bluetooth is power saving but others may turn off bluetooth, wifi and internet to save power. You can check each of these things individually through different API's in the SDK but you can't check if the phone is in power saving mode in general. – Anup Cowkur Sep 04 '13 at 11:12
  • Anup is correct, there's no common way of toggling "power saver" mode as each manufacturer apply this concept differently. It's a shame that Google didn't create and release a public API for this functionality to be used by all manufacturers... – ChuongPham Dec 11 '13 at 04:15