react-native-audio-recorder-player icon indicating copy to clipboard operation
react-native-audio-recorder-player copied to clipboard

Record audio in background

Open juligupta opened this issue 3 years ago • 6 comments

Please fill the template to help you out. Also, please try the Example project compare before submiting the issue when you have certain issue with your project setup.

Version of react-native-audio-recorder-player

2.5.3

Version of React Native

0.63.3

Platforms you faced the error (IOS or Android or both?)

Android

Expected behavior

When application goes to background, the audio recording should continue

Actual behavior

When application goes to background, the audio recording stops

Steps to reproduce the behavior

Start the audio recording while application is in active state Press home button to move application to background. Come back to application after some time. The recording resumes from the time when it went to background. It is not recording while in background.

juligupta avatar Jun 14 '21 18:06 juligupta

Since version 2+ is not maintained, could you also try our recent version which currently is 3.0.9?

hyochan avatar Jun 16 '21 06:06 hyochan

I would really like to know if anyone got this to work. I want to record audio 24/7 and stream the recording to an api without having the app open (personal research project). Please email me at cfa AT karsens.com

Doesn't need to be Android + iOS but preferably iOS. Android is also fine if iOS doesn't work.

CodeFromAnywhere avatar Jan 29 '22 13:01 CodeFromAnywhere

iOS working fine I have issues in android alone in background state audio is not recording in Android @CodeFromAnywhere

GowthamOutlook avatar Feb 10 '22 06:02 GowthamOutlook

the same issue

MacDinhThanh avatar Dec 14 '22 09:12 MacDinhThanh

Any news on this ?

the-mad avatar Jan 02 '24 09:01 the-mad

Ok, if someone still has this issue, I figured out for iOS that you simply have to add :

<key>UIBackgroundModes</key>
<array>
    <string>audio</string>
</array>

In your Info.plist file. By doing this, the recording should continue if the app goes in background.

the-mad avatar Jan 02 '24 10:01 the-mad