Google says here :
Additionally for ACTION_BATTERY_CHANGED: an integer containing the current battery temperature.
The return value is an int, representing, for example, 27.5 degrees Celcius as "275", so it is equal to a tenth of a second. Just drop it onto the float and divide by 10.
Using your example:
int temp = intent.getIntExtra(BatteryManager.EXTRA_TEMPERATURE,0); float tempTwo = ((float) temp) / 10;
OR
float temp = ((float) intent.getIntExtra(BatteryManager.EXTRA_TEMPERATURE,0) / 10;
You do not need to worry about 10 as an int, because only one operand must be a float in order for the result to be as well.
source share