Is it possible to check external battery with Android SDK?
android
Solution
As far as the phone is concerned, an external battery is just a power source like a normal charger. There is no communication; in fact these external batteries short-circuit the two data pins of the USB port to signal their prescence. Since they also contain circuitry to produce constant 5v output voltage the phone has not even a theoretical chance of knowing the battery state. I'm sorry but you are fighting a losing battle here, you will only be able to tell whether the phone is still receiving sufficient power from the external battery or not.
Problem
I would like to create an android app that checks the external battery state (charge via micro USB). I have checked the BatteryManager, UsbAccessory and UsbManager classes it seems non functional. So any hints? Thank you.