How does offline mode work in the Mobile SDK?
How does offline mode work in the Mobile SDK?
The Mobile SDK automatically handles network interruptions with a smart offline mode:
- 15-second buffer: The SDK waits 15 seconds before entering offline mode, giving temporary connection issues time to resolve
- Local storage: Audio and session data are encrypted and stored securely on the device
- Automatic sync: When connection is restored, all offline data is automatically uploaded
- Session continuity: Recording continues uninterrupted during network outages
What triggers offline mode?
What triggers offline mode?
Several scenarios can trigger offline mode:
- Poor or lost Wi-Fi connectivity
- Cellular network issues
- Network switching (Wi-Fi to cellular or vice versa)
- Backend service temporary unavailability
- Authentication token expiration
- Dropped connections during audio streaming
How do I handle the 15-second network buffer?
How do I handle the 15-second network buffer?
Use the network buffer period to show user-friendly notifications:Use the network buffer period to show user-friendly notifications about connection status. The SDK provides session events to notify when sessions convert to offline mode.
Is data secure when stored offline?
Is data secure when stored offline?
Yes, all offline data is highly secure:
- End-to-end encryption: Audio and session data are encrypted before local storage
- Device-level protection: Leverages iOS security features for data protection
- Automatic cleanup: Data is removed from device after successful upload
- HIPAA compliance: Meets healthcare data security requirements
Can I queue multiple offline sessions?
Can I queue multiple offline sessions?
Yes, the SDK supports queuing multiple offline sessions:
- Sessions are stored locally with unique identifiers
- Upload occurs in chronological order when connection returns
- Each session maintains its own context and metadata
- Progress tracking available through session delegates
How do I know when offline data has been uploaded?
How do I know when offline data has been uploaded?
Monitor session events for upload completion:Monitor session events for upload completion status. The SDK provides events for upload started, completed, and failed states to track offline data synchronization progress.
What happens if the device runs out of storage during offline mode?
What happens if the device runs out of storage during offline mode?
The SDK monitors available storage and will:
- Alert your app through delegate events if storage is low
- Prioritize the most recent session data
- Attempt to upload older sessions first when connection returns
- Provide error callbacks if storage becomes critically low
Can I manually trigger sync of offline data?
Can I manually trigger sync of offline data?
The SDK automatically handles offline data synchronization, but you can check sync status through session delegates. Manual triggering isn’t available as the SDK optimizes upload timing based on network conditions and device resources.
How does offline mode affect battery life?
How does offline mode affect battery life?
The SDK is optimized for battery efficiency during offline mode:
- Reduced processing: Minimal background processing during offline recording
- Efficient encoding: Audio compression optimized for battery life
- Smart sync: Upload scheduling considers device charging state
- Background limits: Respects iOS background execution limits
What network conditions are considered 'stable' by the SDK?
What network conditions are considered 'stable' by the SDK?
The SDK considers network conditions stable when:
- Consistent connectivity for data transmission
- Adequate bandwidth for real-time audio streaming
- Low latency for API communications
- Successful authentication token validation