For my project, it is important to monitor the device overheating. How can I do control the temperature of the device? The my code I try does not work
B4X:
Sub Process_Globals
Dim phone As Phone
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Main")
If phone.SdkVersion >= 21 Then ' Check, ver Android if is 5.0 (Lollipop) and more
Dim temperature As Float
temperature = phone.GetTemperature
Log("Temperature device: " & temperature & " °C")
ToastMessageShow("Temperature device: " & temperature & " °C", True)
Else
ToastMessageShow("You version Android .", True)
End If
End Sub