Java tutorial
//package com.java2s; import android.content.Context; import android.media.MediaPlayer; public class Main { private static MediaPlayer mMediaPlayer; public static void playSound(Context context, int soundID) { mMediaPlayer = MediaPlayer.create(context, soundID); mMediaPlayer.setVolume(0.5f, 0.5f); mMediaPlayer.start(); } }