Reputation: 12808
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".
Upvotes: 2
Views: 1130
Reputation: 24820
Register a broadcast reciever for ACTION_POWER_DISCONNECTED
intent and then you could store the time at which power was disconnected.
Upvotes: 1