B4J Question Change media volume

tremara1

Active Member
Licensed User
Longtime User
In b4j is there a way to change the media volume from an app??....Maybe could be by sending keystroke for the vol+ and vol- buttons.....Thanks everyone......
 

Daestrum

Expert
Licensed User
Longtime User
Is this for Javafx Mediaplayer ?

If so it has a volume method where 0 = muted and 1 = full volume.
ie,
B4X:
myMediaPlayer.Volume = 0.0    ' muted
myMediaPlayer.Volume = 0.5      ' half volume
myMediaPlayer.Volume = 1.0    ' full volume
 
Upvote 0

tremara1

Active Member
Licensed User
Longtime User
Thanks.....my bad though, I meant system media volume........
 
Upvote 0

tremara1

Active Member
Licensed User
Longtime User
I have been trying different things I tried using jAWTRobot RobotSingleStrikeKeyCode(174)..should be volume down... but it errors code "Invalid KeyCode. I guess because it is a special key or modifier. Is there another way to send this keystroke??....thanks.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…