android-mediarecorder

MediaRecorder crashes on start

霸气de小男生 提交于 2019-11-26 17:03:39
问题 i've searched many topics but no straight answer. I have this code : recorder = new MediaRecorder(); recorder.setAudioSource(MediaRecorder.AudioSource.MIC); recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); recorder.setOutputFile(mFileName); recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); if(!mStartRecording) { btn.setText("Stop Recording"); try { recorder.prepare(); } catch (IOException e) { e.printStackTrace(); } recorder.start(); mStartRecording = true; } else {

Anyone Have MediaRecorder Working with ParcelFileDescriptor and createPipe()?

做~自己de王妃 提交于 2019-11-26 16:49:28
问题 I am trying to work out an example of recording audio, with the data storage being handled by the app, not MediaRecorder . Use cases include storing the recording on internal storage or encrypting the recording. In principle, this should work using a pipe created by createPipe() on ParcelFileDescriptor , but I am getting malformed output. First, here is a sample project that records "naturally" using MediaRecorder , with MediaRecorder writing directly to an output file on external storage.

Android : Calling Activity from Fragment

冷暖自知 提交于 2019-11-26 13:20:51
问题 I am using fragments inside an activity. I am using MediaRecorder to for audio recording. I have two part of an activity. 1st itself the Activity which will list the recorded file. On it's right side the AudioRecording Activity is called when one select to record for a new file. When the any of the listed file is selected i am using AudioPlayer as to play the recorded file. I am here able to convert the Activity into fragment but when i press on Stop it is terminating the application. Please