This question originally came up in our Slack community and the thread has been consolidated here for long-term reference.
We’ve integrated LiveKit into our React Native app (around 1M monthly users) for voice AI assistance.
When a user closes the voice screen and navigates elsewhere:
- Should I keep the session running (muting the mic in background) or end it?
- Keeping LiveKit active in the background triggers ANR issues on Google Play
- Starting a new session each time causes a 2-3 second delay before the first response
What’s the recommended approach for session management?
To keep LiveKit running in the background on Android, you need to use a Foreground Service. See the documentation:
Important considerations:
- Foreground Services require additional Play Store submission steps
- FGS can confuse users if they don’t expect your app to run in the background
Recommendation:
- If users see your app like a telephone call (long-running conversations), FGS makes sense
- Otherwise, start a new session each time and accept the startup delay
The 2-3 second delay is mainly due to model warmup and connection establishment.