Created
April 26, 2017 07:06
-
-
Save Ajith-Pandian/e2eeeb89e3ac7cb10b332b0596bde2fa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MediaRecorder recorder = new MediaRecorder(); | |
recorder.setAudioSource(MediaRecorder.AudioSource.MIC); | |
recorder.setOutputFormat(MediaRecorder.OutputFormat.AMR_NB); | |
recorder.setOutputFile(audioPath); | |
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); | |
try { | |
recorder.prepare(); | |
recorder.start();l̥ | |
} catch (Exception exception) { | |
Log.e(TAG, "onStart: ", exception); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment