iOS Configuration
Enable Background Modes
- Open your project in Xcode
- Select your target and go to Signing & Capabilities
- Add Background Modes capability
- Enable:
- Audio, AirPlay, and Picture in Picture
- Voice over IP (for VoIP push notifications)
Configure Audio Session
The SDK automatically configures the audio session, but you can customize it in your native code:Android Configuration
Add Permissions
Add to yourAndroidManifest.xml:
Configure Foreground Service
For Android 10+, calls require a foreground service to continue in the background:Keep Screen Awake
The SDK automatically manages wake locks during calls. No additional configuration is needed.Handle App State Changes
Monitor app state to handle background transitions:Handle Audio Interruptions
Handle system audio interruptions (phone calls, alarms, etc.):Connection Events
Listen for connection state changes:Complete Example
Platform Behavior
iOS
| Scenario | Behavior |
|---|---|
| App backgrounded | Audio continues, video pauses |
| Phone call received | Call audio is interrupted |
| Phone call ended | Call audio resumes |
| Screen locked | Audio continues |
Android
| Scenario | Behavior |
|---|---|
| App backgrounded | Audio continues with foreground service |
| Phone call received | Call audio may be interrupted |
| Screen off | Audio continues with wake lock |
Related Documentation
- Picture-in-Picture - Continue calls in floating window
- VoIP Calling - Receive calls when app is closed
- Events - Connection events