【问题标题】:Getting the Battery temperature and unit of the result获取电池温度和结果单位
【发布时间】:2011-12-04 16:31:23
【问题描述】:

我正在阅读如何 get the temperature of the battery 并且我制作了一个小应用程序,并且在我的接收器中我有这样的东西

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

嗯,这个温度有 390 或 380 之类的值,对于摄氏温度来说确实很大,但我认为即使是华氏温度也是很大的数字......

有人可以请高大上的单位是什么,它有一个范围等等。

在官方文档中我发现的只是“包含当前电池温度的整数”

谢谢

【问题讨论】:

标签: android battery units-of-measurement temperature


【解决方案1】:

温度是十分之一摄氏度。也在问题here中讨论过。

【讨论】:

    【解决方案2】:

    结果是您从意图中获得的值的 1/10,这意味着如果您获得 380,则它是 38 度。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-04-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多