Android Question system volume

merlin2049er

Well-Known Member
Licensed User
Longtime User
Hi, I got an app that uses both media player and videoview. Unfortunately the setvolume command only works with the media player. I don't see a way to adjust the volume on the videoview.

I may have to use a system audio control?

Any suggestions?
 

margret

Well-Known Member
Licensed User
Longtime User
It may be a different channel for Media. You can try something like this and try different channels:

B4X:
Sub Set_Volume(Channel As Int, CurrentVolume As Int, ShowUIControl As Boolean)
    Dim p As Phone    'Uses Phone Library
    Dim MaxVol = p.GetVolume(Channel) As Int
    If CurrentVolume +1 < MaxVol Then
        p.SetVolume(Channel, CurrentVolume, ShowUIControl)
    End If
End Sub
 
Upvote 0
Top