stop Ringtone - Android Phone

Android examples for Phone:Sound

Description

stop Ringtone

Demo Code


//package com.java2s;

import android.media.MediaPlayer;

public class Main {
    private static MediaPlayer mediaPlayer = null;

    public static void stopRingtone() {
        if (mediaPlayer != null) {
            if (mediaPlayer.isPlaying()) {
                mediaPlayer.stop();/*www.j av a 2  s.co  m*/
            }
        }
    }
}

Related Tutorials