Code example for MediaPlayer

Methods: release

0
 
        mPlayer = MediaPlayer.create(context, R.raw.newdatatoast);
        mPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener(){
			@Override 
			public void onCompletion(MediaPlayer mp) {
				mp.release();
			}        	 
        }); 
 
    } 
 
	@Override 
	public void show() { 
		super.show(); 
		 
		if(isSound){
			mPlayer.start();
		} 
	} 
	 
	/**