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

Audio recording failed in marshmallow #30

Closed
akhilesh2310 opened this issue Aug 10, 2016 · 10 comments
Closed

Audio recording failed in marshmallow #30

akhilesh2310 opened this issue Aug 10, 2016 · 10 comments

Comments

@akhilesh2310
Copy link

After few seconds of audio recording start function call it failed with the following error message:

setAudioSource failed

This issue I found in marshmallow device. Also can you add support for pause audio recording if possible.

@Snodvod
Copy link

Snodvod commented Aug 22, 2016

Same issue here with a Galaxy s5 :/

@alssl-ross
Copy link

alssl-ross commented Sep 16, 2016

We've created a fork that fixes this issue.

Permissions have changed in Android 6+ and need to be checked whenever the native functionality is used instead of when the app is installed.

The 'setAudioSource' error occurs because the necessary permissions have not been granted.

The fork adds a 'doPermissions' function to the plugin that can be called to check and if necessary request the appropriate permissions.

https://github.com/alssl-ross/cordova-plugin-audio-recorder-api

@akhilesh2310
Copy link
Author

Thanks alssl-ross, your solution worked for me and it is awesome now., I wish if it is possible to have methods for pause and resume audio recording that will make the plugin fully functional.

@akhilesh2310
Copy link
Author

Hi, after installing this plugin https://github.com/alssl-ross/cordova-plugin-audio-recorder-api build failed in ios version.

@alssl-ross
Copy link

Hi, we do not have that problem and have built both iOS and Android versions successfully.

What was the nature of the failure? Do you have an error message?

@akhilesh2310
Copy link
Author

Hi,

please find the error message what I am getting while building for IOS:

Undefined symbols for architecture arm64:
"_AudioSessionSetProperty", referenced from:
___27-[AudioRecorderAPI record:]_block_invoke in AudioRecorderAPI.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

This error coming after installing the plugin from using the following command:

cordova plugin add https://github.com/alssl-ross/cordova-plugin-audio-recorder-api

@alssl-ross
Copy link

Hi,

We've updated the iOS version and removed the reference to AudioSessionSetProperty which was deprecated in iOS 7.

Please readd the plugin and give it a try.

@akhilesh2310
Copy link
Author

Thanks for the solution, everything works perfect now.

@nikmahes
Copy link

Thanks ! Saved my time.

@amirhere
Copy link

Hi

not working in Noughat, on my Nexus 6 phone.

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

5 participants