Setting Phone's Media Volume

Hi,

I was wondering if anyone could guide me in setting the Media volume from inside an application?

The cordova Media only allows me to set the audio for the sound that the application will be playing. What I am looking for is a way to “unmute”/ increase/decrease the Media volume of the actual device through the application?

Any guidance will be really appreciated it!

Kind Regards
Junio

1 Like

bump

I’m looking for the same functionality, especially for android. Any news on this one?

cheers,
Tobias

I don’t see a plugin to do it… You might have to write your own.

It looks like it is possible in Java for Android: http://stackoverflow.com/questions/4178989/change-media-volume-in-android

thanks

yeah, think I might do that, maybe not for the next delivery but afterwards, it’s not really complicated code on the android side :wink:

You can take a look at this plugin:
https://github.com/Jiliac/phonegap-plugin-systemvolume
not a recent plugin but it work in Cordova 4.0

alguien que haya echo este ejemplo podría ayúdar por favor, también busco la misma funcionalidad, solo activar y desactivar el sonido o bien sea un boton de rango para aumentar o disminuir al gusto del usuario!!

I can’t believe there isn’t more elegant way to handle this! I, like you, am not interested in controlling a specific stream/file but rather the device media volume itself. Please give me a shout if you did end up finding something!

1 Like

Only for IOS to set https://github.com/mgcrea/cordova-plugin-volume-control.
For Android just to listen when pressed https://github.com/manueldeveloper/cordova-plugin-volume-buttons