You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 21, 2020. It is now read-only.
react-native-audio : 4.3.0
react-native : 0.60.5
react : 16.8.6
using react-native-sound ? No
Expected behaviour :
Tried recording audio on Android 9.0, with the app backgrounded, or device locked. Expected the audio to be recorded properly.
Actual behaviour
The recording gets cut off when the app is backgrounded or device is locked, after about a minute or so. There's only complete silence, while the recording continues to happen.
Steps to reproduce
On an Android 9.0+ device, start recording, and then background the app. The recording gets cut off at around the 1 minute mark. Note that the recording technically continues, and the recorded file has the full duration. It's just that the audio gets cut off.
This seems to be because of changes in Android 9.0:
Note: On devices running Android 9 (API level 28) or higher, apps running in the background cannot access the microphone. Therefore, your app should record audio only when it's in the foreground or when you include an instance of MediaRecorder in a foreground service.
The same is happening to us on Android and iOS, Android stops after 1 minute of lock screen (background also) and iOS inmediately stops on background, then when the APP come back to foreground the audio restart to recording again without any problem, there is no crashes.
Version
react-native-audio : 4.3.0
react-native : 0.60.5
react : 16.8.6
using react-native-sound ? No
Expected behaviour :
Tried recording audio on Android 9.0, with the app backgrounded, or device locked. Expected the audio to be recorded properly.
Actual behaviour
The recording gets cut off when the app is backgrounded or device is locked, after about a minute or so. There's only complete silence, while the recording continues to happen.
Steps to reproduce
On an Android 9.0+ device, start recording, and then background the app. The recording gets cut off at around the 1 minute mark. Note that the recording technically continues, and the recorded file has the full duration. It's just that the audio gets cut off.
This seems to be because of changes in Android 9.0:
Note: On devices running Android 9 (API level 28) or higher, apps running in the background cannot access the microphone. Therefore, your app should record audio only when it's in the foreground or when you include an instance of MediaRecorder in a foreground service.
Referenced here: https://developer.android.com/guide/topics/media/mediarecorder
The text was updated successfully, but these errors were encountered: