Stay organized with collections
Save and categorize content based on your preferences.
VcnStatusCallback
abstract class VcnStatusCallback
VcnStatusCallback is the interface for Carrier apps to receive updates for their VCNs.
VcnStatusCallbacks may be registered before VcnConfig
s are provided for a subscription group.
Summary
Public methods |
abstract Unit |
Invoked when a VCN Gateway Connection corresponding to this callback's subscription group encounters an error.
|
abstract Unit |
Invoked when status of the VCN for this callback's subscription group changes.
|
Public constructors
VcnStatusCallback
VcnStatusCallback()
Public methods
onGatewayConnectionError
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.
onStatusChanged
abstract fun onStatusChanged(statusCode: Int): Unit
Invoked when status of the VCN for this callback's subscription group changes.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# VcnManager.VcnStatusCallback\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nVcnStatusCallback\n=================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/net/vcn/VcnManager.VcnStatusCallback \"View this page in Java\") \n\n```\nabstract class VcnStatusCallback\n```\n\n|---|---------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.net.vcn.VcnManager.VcnStatusCallback](#) |\n\nVcnStatusCallback is the interface for Carrier apps to receive updates for their VCNs.\n\nVcnStatusCallbacks may be registered before [VcnConfig](/reference/kotlin/android/net/vcn/VcnConfig)s are provided for a subscription group.\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------------------------------|---|\n| [VcnStatusCallback](#VcnStatusCallback())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onGatewayConnectionError](#onGatewayConnectionError(kotlin.String,%20kotlin.Int,%20kotlin.Throwable))`(`gatewayConnectionName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `errorCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `detail:` `[Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)?`)` Invoked when a VCN Gateway Connection corresponding to this callback's subscription group encounters an error. |\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onStatusChanged](#onStatusChanged(kotlin.Int))`(`statusCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Invoked when status of the VCN for this callback's subscription group changes. |\n\nPublic constructors\n-------------------\n\n### VcnStatusCallback\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nVcnStatusCallback()\n```\n\nPublic methods\n--------------\n\n### onGatewayConnectionError\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onGatewayConnectionError(\n gatewayConnectionName: String, \n errorCode: Int, \n detail: Throwable?\n): Unit\n```\n\nInvoked when a VCN Gateway Connection corresponding to this callback's subscription group encounters an error.\n\n| Parameters ||\n|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `gatewayConnectionName` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): the String GatewayConnection name for the GatewayConnection encountering an error. This will match the name for exactly one [VcnGatewayConnectionConfig](/reference/kotlin/android/net/vcn/VcnGatewayConnectionConfig) for the [VcnConfig](/reference/kotlin/android/net/vcn/VcnConfig) configured for this callback's subscription group This value cannot be `null`. |\n| `errorCode` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): 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](/reference/kotlin/android/net/vcn/VcnManager#VCN_ERROR_CODE_INTERNAL_ERROR:kotlin.Int), [android.net.vcn.VcnManager#VCN_ERROR_CODE_CONFIG_ERROR](/reference/kotlin/android/net/vcn/VcnManager#VCN_ERROR_CODE_CONFIG_ERROR:kotlin.Int), or [android.net.vcn.VcnManager#VCN_ERROR_CODE_NETWORK_ERROR](/reference/kotlin/android/net/vcn/VcnManager#VCN_ERROR_CODE_NETWORK_ERROR:kotlin.Int) |\n| `detail` | [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)?: Throwable to provide additional information about the error, or `null` if none |\n\n### onStatusChanged\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onStatusChanged(statusCode: Int): Unit\n```\n\nInvoked when status of the VCN for this callback's subscription group changes.\n\n| Parameters ||\n|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `statusCode` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): 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](/reference/kotlin/android/net/vcn/VcnManager#VCN_STATUS_CODE_NOT_CONFIGURED:kotlin.Int), [android.net.vcn.VcnManager#VCN_STATUS_CODE_INACTIVE](/reference/kotlin/android/net/vcn/VcnManager#VCN_STATUS_CODE_INACTIVE:kotlin.Int), [android.net.vcn.VcnManager#VCN_STATUS_CODE_ACTIVE](/reference/kotlin/android/net/vcn/VcnManager#VCN_STATUS_CODE_ACTIVE:kotlin.Int), or [android.net.vcn.VcnManager#VCN_STATUS_CODE_SAFE_MODE](/reference/kotlin/android/net/vcn/VcnManager#VCN_STATUS_CODE_SAFE_MODE:kotlin.Int) |"]]