I'm reading out several values using the BatteryManager
including voltage
int volt = intent.getIntExtra(BatteryManager.EXTRA_VOLTAGE, -1);
The problem is, that some devices return mV and others V (e.g. 5122 and 5).
Question: Is there a way to retrieve the 开发者_C百科order of magnitude or do I have to implement manual plausibility checks?
thanks
IMHO such a "scale" indicator only exists for the battery level (see http://developer.android.com/reference/android/os/BatteryManager.html) not for the voltage. Usually mV should be returned - but to be on the safe side you will need to do a plausibility check
精彩评论