How do I keep the display active and turn off the light of the hardware buttons?
Button1_Click . . .
Button1_Click . . .
B4X:
Sub Process_Globals
Dim phone1 As Phone
End Sub
Sub Globals
Dim sb As SeekBar
End Sub
Sub Activity_Create(FirstTime As Boolean)
sb.Initialize("sb")
Activity.AddView(sb,10dip, 75%y, 90%x, 30dip)
sb.Value = 100
End Sub
Sub Activity_Resume
pw.KeepAlive(True)
End Sub
Sub Activity_Pause (UserClosed As Boolean)
pw.ReleaseKeepAlive
End Sub
Sub Button1_Click
sb.Value = 1
End Sub
Sub sb_ValueChanged(Value As Int, UsercChanged As Boolean)
phone1.SetScreenBrightness(Max(Value, 1)/100)
End Sub