NetworkProtectionState

Functions

Link copied to clipboard

This method is the same as restart but it also clears the existing VPN reconfiguration, forcing a new registration process with the VPN backend

Link copied to clipboard

This method is the same as stop but it also clears the existing VPN reconfiguration, forcing a new registration process with the VPN backend

Link copied to clipboard

This method returns the ConnectionState of Network Protection which considers both the feature state and the VPNService state.

Link copied to clipboard
abstract suspend fun isEnabled(): Boolean

This is a suspend function because the operation can take time. You DO NOT need to set any dispatcher to call this suspend function

Link copied to clipboard
abstract suspend fun isOnboarded(): Boolean

This is a suspend function because the operation has I/O. You DO NOT need to set any dispatcher to call this suspend function

Link copied to clipboard
abstract suspend fun isRunning(): Boolean

This is a suspend function because the operation can take time You DO NOT need to set any dispatcher to call this suspend function

Link copied to clipboard
abstract fun restart()

This method will restart the Network Protection feature by disabling it and re-enabling back again

Link copied to clipboard
abstract fun serverLocation(): String?

This method returns the current server location Network Protection is routing device's data through.

Link copied to clipboard
abstract fun start()

This method will start the Network Protection feature

Link copied to clipboard
abstract suspend fun stop()

This method will stop the Network Protection feature by disabling it