What are the units for battery temperature and voltage when Intent.BATTERY_ACTION_CHANGED on android device?
Asked Answered
F

1

19

I retrieved battery temperature and voltage information using the intent Intent.ACTION_BATTERY_CHANGED and the values I got are pretty weird. I could not get any clue: temperature=270 and voltage=3782!

What are these values? Do they have any units like celsius, fahrenheit or milli or micro volt?

Foust answered 1/2, 2011 at 8:35 Comment(0)
M
33
  • voltage- int, current battery voltage in millivolts

  • temperature - int, current battery temperature in tenths of a degree Centigrade

From here.

Meemeece answered 1/2, 2011 at 8:47 Comment(3)
what is tenths of a degree centigrade?? how to convert it to celcius?Foust
@AshokJeev, you divide it by 10 because there are 10 tenths in an unit: temperature_C = (float) ( intent.getIntExtra(BatteryManager.EXTRA_TEMPERATURE, 0) / 10);Flare
Celcius is the same as centigrade. Mr. Celcius, who invented that temperature scale wanted it named centigrage, but it is also called Celcius since his death.Gummy

© 2022 - 2024 — McMap. All rights reserved.