Java tutorial
//package com.java2s; import android.media.MediaPlayer; public class Main { private static MediaPlayer mPlayer; public static MediaPlayer getInstance() { if (mPlayer == null) { mPlayer = new MediaPlayer(); } return mPlayer; } }