开发者

Getting the Battery temperature and unit of the result

开发者 https://www.devze.com 2023-04-12 13:52 出处:网络
I was reading how to get the tempera开发者_如何转开发ture of the battery and I make small app, and in my receiver I have something like this

I was reading how to get the tempera开发者_如何转开发ture 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


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消