以下代码用于获取电池温度。
private BroadcastReceiver mBatInfoReceiver = new BroadcastReceiver(){
@Override
public void onReceive(Context arg0, Intent intent) {
int temperature = intent.getIntExtra(BatteryManager.EXTRA_TEMPERATURE, 0);
....
}
};
但是,我想以百分比显示电池温度。如何找到EXTRA_SCALE
电池温度或电池温度的最大值?