> ## Documentation Index
> Fetch the complete documentation index at: https://developer.suki.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Offline & Networking

> Offline mode, network handling, and connectivity features in the Mobile SDK

<Accordion title="How does offline mode work in the Mobile SDK?">
  The Mobile SDK automatically handles network interruptions with a smart offline mode:

  1. **15-second buffer**: The SDK waits 15 seconds before entering offline mode, giving temporary connection issues time to resolve
  2. **Local storage**: Audio and session data are encrypted and stored securely on the device
  3. **Automatic sync**: When connection is restored, all offline data is automatically uploaded
  4. **Session continuity**: Recording continues uninterrupted during network outages

  The SDK notifies your app about offline/online transitions through session delegate events.
</Accordion>

<Accordion title="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

  The SDK automatically detects these conditions and handles the transition.
</Accordion>

<Accordion title="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.
</Accordion>

<Accordion title="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

  No sensitive data is stored in plain text on the device.
</Accordion>

<Accordion title="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

  The SDK supports queuing multiple offline sessions, with each session maintaining its own context and metadata for ordered processing when connection returns.
</Accordion>

<Accordion title="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.
</Accordion>

<Accordion title="What happens if the device runs out of storage during offline mode?">
  The SDK monitors available storage and will:

  1. Alert your app through delegate events if storage is low
  2. Prioritize the most recent session data
  3. Attempt to upload older sessions first when connection returns
  4. Provide error callbacks if storage becomes critically low

  Implement storage monitoring in your app for the best user experience.
</Accordion>

<Accordion title="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.
</Accordion>

<Accordion title="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

  Battery impact is minimized while maintaining recording quality.
</Accordion>

<Accordion title="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

  The 15-second buffer accommodates temporary fluctuations in these conditions.
</Accordion>
