Private Sub Application_Background
Log("Moving to BackGround")
Common.RestoreBrightness
App.IdleTimerDisabled = False
Common.InactivityTimer.Enabled = False
Sleep(10)
Log("Move Complete")
End Sub
B4X:
Public Sub RestoreBrightness
Dim no As NativeObject
no.Initialize("UIScreen").RunMethod("mainScreen", Null).SetField("brightness", brightness)
End Sub
Using the above code when the screen is dimmed is not restore the original brightness (0.1 to 1.0) when the Home button is pressed.