Sunday, January 15, 2012

Get last battery charge date time from BatterManager


How do I get the last charge date/time from Android BatteryManager? Well maybe it's not BatteryManager but some other API to use for this.



I want to display something like "Charged 2 hours ago".

1 comment:

  1. Register a broadcast reciever for ACTION_POWER_DISCONNECTED intent and then you could store the time at which power was disconnected.

    ReplyDelete