Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record Audio but not play in Android Oreo 8.0 #46

Open
kukadiyaAni opened this issue Feb 12, 2018 · 5 comments
Open

Record Audio but not play in Android Oreo 8.0 #46

kukadiyaAni opened this issue Feb 12, 2018 · 5 comments

Comments

@kukadiyaAni
Copy link

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

@vikoo
Copy link

vikoo commented Apr 10, 2018

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();

@sandy415
Copy link

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

nihatalim pushed a commit to nihatalim/AndroidAudioRecorder that referenced this issue Jul 9, 2018
Android 8.0 issue has been solved.
@nihatalim
Copy link

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.

nihatalim@5a67078

@gaohequan
Copy link

@nihatalim Thank You VeryMuch

@oneHamidreza
Copy link

use this guys

https://github.com/shetmobile/AndroidAudioRecorder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants