react-native-webrtc / react-native-incall-manager

Handling media-routes/sensors/events during a audio/video chat on React Native
ISC License
547 stars 191 forks source link

How to keep call active when app is in background? #208

Open AlbinCederblad opened 1 year ago

AlbinCederblad commented 1 year ago

The app loses the audio stream after 1 minute if app is in background.

How do I solve this?

I am only using the audio if that makes any difference.

hanios123 commented 1 year ago

@AlbinCederblad you may need to use foreground service for android to keep audio stream if app background or phone is locked , you can use react-native-callkeep or react-native-foreground-service

vanGalilea commented 1 year ago

You can do this with Notifee's registerForegroundService see docs