Android Question how can I change volume?

khosrwb

Active Member
Licensed User
Longtime User
how can I Volume up or down with touch up or down in activity or panel?
How can touch the up and down in a voice low and high activity do?
 
Last edited:

eurojam

Well-Known Member
Licensed User
Longtime User
there some ressources about that. You should search the forum first...
->with google you can type: Volume change site:www.b4x.com ... try and you will see tons of results;)
 
Upvote 0

khosrwb

Active Member
Licensed User
Longtime User
there some ressources about that. You should search the forum first...
->with google you can type: Volume change site:www.b4x.com ... try and you will see tons of results;)

I try under line code but its not work
 

Attachments

  • action up or down.zip
    12.1 KB · Views: 192
Upvote 0

eurojam

Well-Known Member
Licensed User
Longtime User
the code in your example does change the volume, but only for music....
B4X:
valume.SetVolume(valume.VOLUME_MUSIC,1,True)
If you want t for alarm then:
B4X:
valume.SetVolume(valume.VOLUME_ALARM,1,True)
 
Upvote 0

khosrwb

Active Member
Licensed User
Longtime User
I will change volume by
move up or down on the panel
when I move up and up
add too volume up and up

like " MX player " application
 
Upvote 0
Top