# VcnManager.VcnStatusCallback

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Ctors](https://developer.android.com/reference/android/net/vcn/VcnManager.VcnStatusCallback#pubctors)\|[Methods](https://developer.android.com/reference/android/net/vcn/VcnManager.VcnStatusCallback#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/net/vcn/VcnManager.VcnStatusCallback#inhmethods)  

# VcnManager.VcnStatusCallback

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/net/vcn/VcnManager.VcnStatusCallback "View this page in Kotlin")\|Java

`
public
static

abstract
class
VcnManager.VcnStatusCallback
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|----------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.net.vcn.VcnManager.VcnStatusCallback |

<br />

*** ** * ** ***

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

VcnStatusCallbacks may be registered before[VcnConfig](https://developer.android.com/reference/android/net/vcn/VcnConfig)s are provided for a subscription group.

## Summary

|                                                         ### Public constructors                                                          ||
|---------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[VcnStatusCallback](https://developer.android.com/reference/android/net/vcn/VcnManager.VcnStatusCallback#VcnStatusCallback())`() ` |

|                                                                                                                                                                                                                                                       ### Public methods                                                                                                                                                                                                                                                       ||
|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[onGatewayConnectionError](https://developer.android.com/reference/android/net/vcn/VcnManager.VcnStatusCallback#onGatewayConnectionError(java.lang.String,%20int,%20java.lang.Throwable))`(`[String](https://developer.android.com/reference/java/lang/String)` gatewayConnectionName, int errorCode, `[Throwable](https://developer.android.com/reference/java/lang/Throwable)` detail) ` Invoked when a VCN Gateway Connection corresponding to this callback's subscription group encounters an error. |
| ` abstract void` | ` `[onStatusChanged](https://developer.android.com/reference/android/net/vcn/VcnManager.VcnStatusCallback#onStatusChanged(int))`(int statusCode) ` Invoked when status of the VCN for this callback's subscription group changes.                                                                                                                                                                                                                                                                            |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Public constructors

### VcnStatusCallback

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public VcnStatusCallback ()
```

<br />

<br />

## Public methods

### onGatewayConnectionError

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract void onGatewayConnectionError (String gatewayConnectionName, 
                int errorCode, 
                Throwable detail)
```

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

<br />

|                                                                                                                                                                                                                                                                                  Parameters                                                                                                                                                                                                                                                                                   ||
|-------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `gatewayConnectionName` | `String`: the String GatewayConnection name for the GatewayConnection encountering an error. This will match the name for exactly one[VcnGatewayConnectionConfig](https://developer.android.com/reference/android/net/vcn/VcnGatewayConnectionConfig)for the[VcnConfig](https://developer.android.com/reference/android/net/vcn/VcnConfig)configured for this callback's subscription group This value cannot be`null`. <br />                                                                                                                       |
| `errorCode`             | `int`: the code to indicate the error that occurred. This value will be one of VCN_ERROR_CODE_\*. Value is[VcnManager.VCN_ERROR_CODE_INTERNAL_ERROR](https://developer.android.com/reference/android/net/vcn/VcnManager#VCN_ERROR_CODE_INTERNAL_ERROR),[VcnManager.VCN_ERROR_CODE_CONFIG_ERROR](https://developer.android.com/reference/android/net/vcn/VcnManager#VCN_ERROR_CODE_CONFIG_ERROR), or[VcnManager.VCN_ERROR_CODE_NETWORK_ERROR](https://developer.android.com/reference/android/net/vcn/VcnManager#VCN_ERROR_CODE_NETWORK_ERROR) <br /> |
| `detail`                | `Throwable`: Throwable to provide additional information about the error, or`null`if none <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                     |

### onStatusChanged

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract void onStatusChanged (int statusCode)
```

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

<br />

|                                                                                                                                                                                                                                                                                                                                                                                                          Parameters                                                                                                                                                                                                                                                                                                                                                                                                          ||
|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `statusCode` | `int`: the code for the status change encountered by this[VcnStatusCallback](https://developer.android.com/reference/android/net/vcn/VcnManager.VcnStatusCallback)'s subscription group. This value will be one of VCN_STATUS_CODE_\*. Value is[VcnManager.VCN_STATUS_CODE_NOT_CONFIGURED](https://developer.android.com/reference/android/net/vcn/VcnManager#VCN_STATUS_CODE_NOT_CONFIGURED),[VcnManager.VCN_STATUS_CODE_INACTIVE](https://developer.android.com/reference/android/net/vcn/VcnManager#VCN_STATUS_CODE_INACTIVE),[VcnManager.VCN_STATUS_CODE_ACTIVE](https://developer.android.com/reference/android/net/vcn/VcnManager#VCN_STATUS_CODE_ACTIVE), or[VcnManager.VCN_STATUS_CODE_SAFE_MODE](https://developer.android.com/reference/android/net/vcn/VcnManager#VCN_STATUS_CODE_SAFE_MODE) <br /> |