Overview
Mobile browsers have privacy protections that affect voice conversations when your app goes to the background.Context is preserved: When auto-reconnection happens, your conversation context and history are automatically
restored. You don’t need to worry about losing the conversation state.
What Happens on Mobile
1. App Goes to Background
When users switch apps or lock their phone:- Microphone access is revoked within seconds (privacy protection)
- User’s voice won’t reach the AI, even though connection appears active
- WebRTC connection may drop after extended background time
2. App Returns to Foreground
When users return to your app:- SDK automatically attempts to reconnect
- Microphone permissions are restored
- Conversation resumes seamlessly
Handling Reconnection
Listen for Connection State Changes
Detect New vs Reconnected Sessions
Use thesession.created
event to know if this is a fresh start or reconnection:
Best Practices
User Experience
- Show clear status: Use visual indicators for connection states
- Inform about background: Educate users that voice won’t work in background due to privacy restrictions
- Seamless return: Make reconnection feel automatic and smooth
Summary
- Mobile browsers revoke mic access when app goes to background
- SDK auto-reconnects when app returns to foreground
- Use
onStatusChange
to show connection status to users - Use
session.created
withrun_id
to detect new vs reconnected sessions - Provide clear visual feedback so users understand what’s happening