Android Question Hardware buttons, light off.

Yeshua

Member
Licensed User
Longtime User
How do I keep the display active and turn off the light of the hardware buttons?

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
 

Yeshua

Member
Licensed User
Longtime User
Thank you Erel, but I have not yet figured out how I do I turn off the luminosity of hardware buttons (for example: home button, back button . . .).
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…