Is it possible to have Expo app record audio when the app goes in background? [iOS primarily]

94 views Asked by At

I'm considering using Expo (or bare React Native) for a simple voice memo app. It needs to be able to record for a long periods (up to 1 hour) and also needs to be able to record when the app goes into the background. Focus right now is on the iOS version of the app.

After researching, I'm still not sure if Expo or RN can handle this (especially on the iOS). Please let me know if you have experience with something similar, and what libraries would you use for these requirements

  • record audio up to 1 hour
  • record while the app is in the background
  • device will never be locked while the app is recording so this is not concern
1

There are 1 answers

1
Pratik Prakash Bindage On

Expo and React Native (bare) can record audio for long periods of time and in the background.

  1. react-native-audio-record enables recording audio in the foreground. Ideal for long-duration recording. GitHub URL: https://github.com/jsierles/react-native-audio

  2. React-native-background-job: Enables background tasks, such as audio recording. GitHub URL: https://github.com/vikeri/react-native-background-job