emj365 / cordova-plugin-audio-recorder-api

This plugin is a Cordova audio recorder plugin which works as API.
86 stars 63 forks source link

Audio recording failed in marshmallow #30

Closed akhilesh2310 closed 8 years ago

akhilesh2310 commented 8 years ago

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 commented 8 years ago

Same issue here with a Galaxy s5 :/

alssl-ross commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

alssl-ross commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

Thanks for the solution, everything works perfect now.

nikmahes commented 7 years ago

Thanks ! Saved my time.

amirhere commented 7 years ago

Hi

not working in Noughat, on my Nexus 6 phone.