Added in API level 31

VcnStatusCallback


abstract class VcnStatusCallback
kotlin.Any
   ↳ android.net.vcn.VcnManager.VcnStatusCallback

VcnStatusCallback is the interface for Carrier apps to receive updates for their VCNs.

VcnStatusCallbacks may be registered before VcnConfigs are provided for a subscription group.

Summary

Public constructors

Public methods
abstract Unit
onGatewayConnectionError(gatewayConnectionName: String, errorCode: Int, detail: Throwable?)

Invoked when a VCN Gateway Connection corresponding to this callback's subscription group encounters an error.

abstract Unit
onStatusChanged(statusCode: Int)

Invoked when status of the VCN for this callback's subscription group changes.

Public constructors

VcnStatusCallback

VcnStatusCallback()

Public methods

onGatewayConnectionError

Added in API level 31
abstract fun onGatewayConnectionError(
    gatewayConnectionName: String,
    errorCode: Int,
    detail: Throwable?
): Unit

Invoked when a VCN Gateway Connection corresponding to this callback's subscription group encounters an error.

Parameters
gatewayConnectionName String: the String GatewayConnection name for the GatewayConnection encountering an error. This will match the name for exactly one VcnGatewayConnectionConfig for the VcnConfig configured for this callback's subscription group This value cannot be null.
errorCode Int: the code to indicate the error that occurred. This value will be one of VCN_ERROR_CODE_*. Value is android.net.vcn.VcnManager#VCN_ERROR_CODE_INTERNAL_ERROR, android.net.vcn.VcnManager#VCN_ERROR_CODE_CONFIG_ERROR, or android.net.vcn.VcnManager#VCN_ERROR_CODE_NETWORK_ERROR
detail Throwable?: Throwable to provide additional information about the error, or null if none

onStatusChanged

Added in API level 31
abstract fun onStatusChanged(statusCode: Int): Unit

Invoked when status of the VCN for this callback's subscription group changes.

Parameters
statusCode Int: the code for the status change encountered by this VcnStatusCallback's subscription group. This value will be one of VCN_STATUS_CODE_*. Value is android.net.vcn.VcnManager#VCN_STATUS_CODE_NOT_CONFIGURED, android.net.vcn.VcnManager#VCN_STATUS_CODE_INACTIVE, android.net.vcn.VcnManager#VCN_STATUS_CODE_ACTIVE, or android.net.vcn.VcnManager#VCN_STATUS_CODE_SAFE_MODE