Code example for AudioRecord

Methods: readreleasestartRecordingstop

0
	public void record() { 
		recordingThread = new Thread(new Runnable() {
 
			@Override 
			public void run() { 
				recorder.startRecording();
				recorder.read(readData, 0, readData.length);
				recorder.stop();
				recorder.release();
				 
				WriteFile("RecordedAudio.txt", readData);
			} 
		},"AudioRecorder Thread"); 
 
		recordingThread.start();
	} 
	 
	private void WriteFile(String fileName, short[] data) {
		try { 
			FileWriter writer = new FileWriter (Environment.getExternalStorageDirectory().getPath()+"/Download/"+fileName);
			for(int i = 0; i < data.length; i++) {