1

I was reading how to get the temperature of the battery and I make small app, and in my receiver I have something like this

int temp = intent.getIntExtra("temperature", 0);

well , this temp have values like 390 or 380 something that is really big to be Celsius but I think that is big number even for Fahrenheit...

can someone please tall what is the unit, does it have a range and so on.

in the official documentation all I found was "integer containing the current battery temperature"

Thanks

Community
  • 1
  • 1
Lukap
  • 31,523
  • 64
  • 157
  • 244
  • Tempature is tenths of a degree Centigrade see: http://stackoverflow.com/questions/4860415/what-are-the-units-for-battery-temperature-and-voltage-when-intent-battery-action – ciscogambo Oct 10 '11 at 21:04
  • please add 1/10 of centigrade as answer so I can close this thread, and thanks – Lukap Oct 10 '11 at 21:18

2 Answers2

3

The temperature is in tenths of a degree centigrade. Also discussed in question here.

Community
  • 1
  • 1
ciscogambo
  • 1,160
  • 11
  • 18
1

the result is 1/10 of the value you get from the intent it means if you get 380 it is 38 degrees.

Lukap
  • 31,523
  • 64
  • 157
  • 244