3

I'm creating an application, and I need to be able to get the battery's current (mA/mAh). I have the voltage/temp/level etc and this is the final thing I need to get, and coincidentally the hardest too.

I've looked at CurrentWidget source code and searched Google high and low, and I have all the classes/methods to pull the data out, it's just the path to the file containing the current which is stopping me from getting it.

"CurrentWidget" contains a lot of different paths to the file (for various devices) but none of them work on my ASUS EEPad Transformer on 4.0.3, which I need it to be working on as it's my testing device and all I can get my hands on. I've been in to the adb shell and dug around the root of the tablet for hours but I can't seem to find anything apart from things like name, temp, voltage_now and others which I already have. They're all stored in /sys/class/power_supply/battery, but there's no "current" like I expected, and like there seems to be on other devices.

Thanks for any help, I know this is a long one!

Daniel Fischer
  • 181,706
  • 17
  • 308
  • 431
fypfyp
  • 206
  • 4
  • 10
  • Any chance you can get the resistance? – mikeswright49 Nov 20 '12 at 15:46
  • 1
    Many of the Transformers started to receive JellyBean updates. Not that it'll probably fix your issue, but it's worth giving it a try. The ICS Transformers always gave me problems during dev. – Ifrit Nov 20 '12 at 15:54
  • mikeswright49: the resistance changes depending on what modules (wifi, bluetooth, etc) draw power. Also, calculating the resistance in the first place for the whole device will be relatively impossible as it most likely is not a linear device. – Femaref Nov 20 '12 at 16:17

0 Answers0