hyochan / react-native-audio-recorder-player

react-native native module for audio recorder and player.
MIT License
720 stars 215 forks source link

Record audio in background #323

Open juligupta opened 3 years ago

juligupta commented 3 years ago

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.

hyochan commented 3 years ago

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

CodeFromAnywhere commented 2 years ago

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.

GowthamOutlook commented 2 years ago

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

MacDinhThanh commented 1 year ago

the same issue

the-mad commented 10 months ago

Any news on this ?

the-mad commented 10 months ago

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.

askpatrickw commented 3 months ago

I'm wondering, is there any update on this for Android?

If someone can provide guidance, my team is willing to help add this feature.