android - How to increase volume of mediaPlayer -
i writing app in situations warns user alarm sound. problem in situation volume of media playing may decreased user or media volume silent. want check volume programatically , increase 100% , play alarm.
any idea? note have tested mediaplayer.setvolume(1,1)
, nothing changed.
this isn't function setting volume. here it's setting of volume value:
audiomanager audiomanager = (audiomanager) this.getsystemservice(context.audio_service); // example set volume of played media maximum. audiomanager.setstreamvolume (audiomanager.stream_music, audiomanager.getstreammaxvolume(audiomanager.stream_music),0);
Comments
Post a Comment