Code example for MediaRecorder

Methods: releasestop

0
	protected void stopRecording(){ 
		try{ 
			if((recorder != null)&&(isRecording))
			{ 
				isRecording = false;
				recorder.stop();
		        recorder.release(); 
			} 
			moveFile(saveFile);
		}catch (Exception e){e.printStackTrace();}
	}	 
	 
	protected void startPlaying(String file) {
		if (isPlaying==false) {
			try { 
				mPlayer = new MediaPlayer();
				isPlaying=true;
				Log.d("Audio startPlaying", "audio: " + file);
				if (isStreaming(file))
				{ 
					Log.d("AudioStartPlaying", "Streaming");