public class AudioRecorder {
final MediaRecorder recorder = new MediaRecorder();
public void start() throws IOException { recorder.setAudioSource(MediaRecorder.AudioSource.MIC); recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); recorder.setOutputFile(sdCardPath+"/xyz.3gp");
recorder.prepare();
recorder.start();
}
public void stop() throws IOException {
recorder.stop();
recorder.release();
}
}
sdCardPath cannot be resolved to a variable
ReplyDeleteUse sdCardPath = "/sdcard/external_sd/" or String url = Environment.getExternalStorageDirectory();
ReplyDelete