AndroidAudioRecorder icon indicating copy to clipboard operation
AndroidAudioRecorder copied to clipboard

Record Audio but not play in Android Oreo 8.0

Open kukadiyaAni opened this issue 7 years ago • 5 comments

Thanks for great library.

I have integrated in my work good but in Android 8.0 recorded but not play.

I have go in file manage and play in music play but getting error "Coundn't play the track that you requested" also not play using music player

whatsapp image 2018-02-12 at 4 20 43 pm

kukadiyaAni avatar Feb 12 '18 10:02 kukadiyaAni

you have to make the following changes in the library. It worked for me.

  1. build.gradle of lib https://github.com/adrielcafe/AndroidAudioRecorder/blob/master/lib/build.gradle change version to 1.1.5 of om-recorder library compile 'com.kailashdabhi:om-recorder:1.1.5'

  2. Utils.java https://github.com/adrielcafe/AndroidAudioRecorder/blob/master/lib/src/main/java/cafe/adriel/androidaudiorecorder/Util.java update the function with the following code public static PullableSource getMic(AudioSource source, AudioChannel channel, AudioSampleRate sampleRate) { return new PullableSource.Default( new AudioRecordConfig.Default( source.getSource(), AudioFormat.ENCODING_PCM_16BIT, channel.getChannel(), sampleRate.getSampleRate())); }

  3. AudioRecorderActivity.java https://github.com/adrielcafe/AndroidAudioRecorder/blob/master/lib/src/main/java/cafe/adriel/androidaudiorecorder/AudioRecorderActivity.java

change second last line in resumeRecording() to recorder.startRecording(); instead of recorder.resumeRecording();

vikoo avatar Apr 10 '18 11:04 vikoo

Hello @vikoo , I tried your changes but didn't solve the issue.

sandy415 avatar Apr 10 '18 13:04 sandy415

I solved this issue following these steps and working on GM5Plus 8.0 Oreo. You can download source code from below link and add your project as a library to lib package.

https://github.com/nihatalim/AndroidAudioRecorder/commit/5a67078e3dbd87c44b4e26e45686dff71a386894

nihatalim avatar Jul 09 '18 19:07 nihatalim

@nihatalim Thank You VeryMuch

gaohequan avatar Aug 02 '18 09:08 gaohequan

use this guys

https://github.com/shetmobile/AndroidAudioRecorder

oneHamidreza avatar Feb 05 '19 13:02 oneHamidreza