Get battery status from OF

Hi,
could someone point me in the right direction on how to get the battery status of an android device fom within OF running on android.

I guess this would involve some custom JNI.

E

what you need is here:
http://developer.android.com/training/monitoring-device-state/battery-monitoring.html

you have to make a wrapper of java to c, take a cue from:
addons/ofxAndroid/ofAndroidLib/src/cc/openframeworks/OFAndroid.java
addons/ofxAndroid/src/ofxAndroidUtils.cpp:

Hi
Dario

thanks for your answer.

I went a different way since on unixes everything is a file I ended up reading : /sys/class/power_supply directly from my app and it works like charm

E