1. Download our Official Android App: Forums for Android!

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

Discussion in 'Android Development' started by androidmani, Jun 30, 2011.

  1. androidmani

    androidmani Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Jun 30, 2011

    Jun 30, 2011
    1
    0
    5
    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);
     

    Advertisement

Share This Page

Loading...