mport android
droid=android.Android()
name=droid.batteryGetHealth()
print name
print name.result
结果是:
Result(id=1, result=None, error=None)
None
问题是个根据API来看
batteryGetHealth()
Returns the most recently received battery health data:
1 - unknown;
2 - good;
3 - overheat;
4 - dead;
5 - over voltage;
6 - unspecified failure;
显示的结果显然是不对的
------------------------------------------
batterystartmonitoring()
开始监视电池状态.,发 "battery" 事件.
最后再跑这个:
停止监视电池状态
batterystopmonitoring()