获取电池在Android温度温度、电池、Android

2023-09-12 02:00:52 作者:毁灭性喜欢

我如何得到电池的温度机器人?

How do I get the temperature of the battery in android?

推荐答案

http://developer.android.com/reference/android/os/BatteryManager.html

公共静态最后弦乐EXTRA_TEMPERATURE 额外的ACTION_BATTERY_CHANGED:整数包含当前电池温度。

public static final String EXTRA_TEMPERATURE Extra for ACTION_BATTERY_CHANGED: integer containing the current battery temperature.