Code example for MediaPlayer: Playing audio and video

Methods: prepareresetsetDataSourcestart

0
        });         
    } 
    private void playMusic(String path)
    { 
    	try{ 
    		mMediaPlayer.reset();
    		mMediaPlayer.setDataSource(path);
    		mMediaPlayer.prepare();
    		mMediaPlayer.start();
    	}catch (IOException e){}   	
    } 
    class MusicFilter implements FilenameFilter
    { 
 
		@Override 
		public boolean accept(File arg0, String arg1) {
			// TODO Auto-generated method stub 
			return false; 
		}	 
    } 
    @Override