Automatic connection recovery

Note: Automatic connection recovery is supported on Android, iOS, macOS, and Windows.

The Vivox SDK provides automatic connection recovery to accommodate brief periods of network interruption. This connection recovery occurs without intervention from the application.

An application might temporarily lose internet connectivity when its user moves between internet connection points. For example, a disconnection could occur when a user is roaming between cellular networks or when a device switches between an LTE mobile data connection and a home wireless network connection.

If network connectivity is lost, the Vivox SDK attempts for up to 30 seconds to restore connectivity.

VivoxService.Instance.ConnectionRecovering and VivoxService.Instance.ConnectionRecovered are events that can be subscribed to track when the connection is recognized as lost and recovery begins and when the connection is recovered. You can monitor these events to provide users with a display of their Vivox connection health.

A VivoxService.Instance.ConnectionFailedToRecover event will be fired if a session resume fails after the application attempts to reconnect to the network.

In the scenario where attempts at recovery have ultimately failed, you can use a minimal integration to alert the user of the reconnect failure, because user action is likely required to address any issues with their network connection health. A more in-depth integration might help with recovery from a partial disconnection from Vivox.

Important: If an additional system exists to reconnect users, you must allow the default Vivox system to finish attempting to recover before another system tries to recover the connection. If the Vivox attempts aren't completed it can result in a connection recovery loop.