Code example for MediaPlayer

Methods: preparesetDataSourcesetOnCompletionListenersetOnErrorListenersetVolume

0
    		return mFileName;
    	} 
    	private void BufferInternal() throws IOException 
    	{ 
    		 
    		mMP = new MediaPlayer();
    		mMP.setOnCompletionListener( new CompletionListener() );
    		mMP.setOnErrorListener( new ErrorListener() );
            // Load the file 
            final FileInputStream fileInStream = new FileInputStream( mFileName );
            // Prepare the media player 
            mMP.setDataSource( fileInStream.getFD() );
            // Set the volume to the maximum. Adjustment is performed through 
            // the general media volume setting 
            mMP.setVolume(1, 1);                     
            /* 
             * Prepare the data file 
             */ 
            mMP.prepare();
             
            mBuffered = true;	            
    	} 
    	 
    	/*