Android Question disable volume control UI

hi erel
I used the phone.setvulome(value,value,false) library to hide the volume UI I also used the keyup and keydown event but it still shows up event.
In general, I need the volume control bar not to be displayed in in my program when if pressed key up volume or key down volume hide control bar sound.

device Android 10 model my device poco x3 I hope you understand what I mean
 
Upvote 0

bsnqt

Active Member
Licensed User
Longtime User
hi erel
I used the phone.setvulome(value,value,false) library to hide the volume UI I also used the keyup and keydown event but it still shows up event.
In general, I need the volume control bar not to be displayed in in my program when if pressed key up volume or key down volume hide control bar sound.

device Android 10 model my device poco x3 I hope you understand what I mean
Hi ahmadkhazali,

Hope you still need a solution, I just read your post today.
You need to do exactly what Erel advised you.
Something like this

B4X:
Sub Activity_KeyPress (KeyCode As Int) As Boolean
    
    If KeyCode = KeyCodes.KEYCODE_VOLUME_UP Then
        Return True
    End If
    
    Return False
        
End Sub
 
Upvote 0
Top