• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps how to play selected ring tone when changing volume in android

how to play selected ring tone when changing volume in android


I have coded like below. But this is always playing beep sound and not playing the selected ringtone . Can anyone help me

private
AudioManager amanager;

amanager
= (AudioManager)this.getSystemService(Context.AUDIO_SERVICE);

amanager
.setStreamVolume(AudioManager.STREAM_RING, progress, AudioManager.FLAG_PLAY_SOUND);
 
Back
Top Bottom