AndroidAudioRecorder
AndroidAudioRecorder copied to clipboard
Record Audio but not play in Android Oreo 8.0
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
you have to make the following changes in the library. It worked for me.
-
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'
-
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())); }
-
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();
Hello @vikoo , I tried your changes but didn't solve the issue.
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 Thank You VeryMuch
use this guys
https://github.com/shetmobile/AndroidAudioRecorder