Android - Drain battery quickly on purpose

arleitiss picture arleitiss · Jul 24, 2014 · Viewed 40k times · Source

I am nearly finished with my app and last functionality to be made is to call specific action when battery level reaches below specific level.

So for test purposes I am wondering - how can I drain battery?

P.S - Using AVD wont work since my app is using Google Play services so I am testing app on my phone.

Answer

Gilad Haimov picture Gilad Haimov · Jul 24, 2014

For fastest drain turn on at once all battery drainers:

  • Acquire a Wake lock with Full screen brightness (No. 1 battery drainer)
  • Vibration
  • GPS with zero time polling intervals
  • Turn on WiFi and continuously issue http requests
  • Turn on Bluetooth and continuously issue scan commands

And, since you're a smart guy, you will probably use this app instead of hand-coding all of the above.