# SipRegistrationListener

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

# SipRegistrationListener

*** ** * ** ***

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

`
public


interface
SipRegistrationListener
`  
`


`

|-----------------------------------------|
| android.net.sip.SipRegistrationListener |

<br />

*** ** * ** ***

<br />

**This interface was deprecated in API level 31.**   
[SipManager](https://developer.android.com/reference/android/net/sip/SipManager)and associated classes are no longer supported and should not be used as the basis of future VOIP apps.

Listener for SIP registration events.

## Summary

|                                                                                                                                                                                                       ### Public methods                                                                                                                                                                                                       ||
|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[onRegistering](https://developer.android.com/reference/android/net/sip/SipRegistrationListener#onRegistering(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` localProfileUri) ` Called when a registration request is sent.                                                                                                                                     |
| ` abstract void` | ` `[onRegistrationDone](https://developer.android.com/reference/android/net/sip/SipRegistrationListener#onRegistrationDone(java.lang.String,%20long))`(`[String](https://developer.android.com/reference/java/lang/String)` localProfileUri, long expiryTime) ` Called when the registration succeeded.                                                                                                      |
| ` abstract void` | ` `[onRegistrationFailed](https://developer.android.com/reference/android/net/sip/SipRegistrationListener#onRegistrationFailed(java.lang.String,%20int,%20java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` localProfileUri, int errorCode, `[String](https://developer.android.com/reference/java/lang/String)` errorMessage) ` Called when the registration failed. |

## Public methods

### onRegistering

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

```
public abstract void onRegistering (String localProfileUri)
```

Called when a registration request is sent.

<br />

|                                       Parameters                                       ||
|-------------------|---------------------------------------------------------------------|
| `localProfileUri` | `String`: the URI string of the SIP profile to register with <br /> |

### onRegistrationDone

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

```
public abstract void onRegistrationDone (String localProfileUri, 
                long expiryTime)
```

Called when the registration succeeded.

<br />

|                                       Parameters                                       ||
|-------------------|---------------------------------------------------------------------|
| `localProfileUri` | `String`: the URI string of the SIP profile to register with <br /> |
| `expiryTime`      | `long`: duration in seconds before the registration expires <br />  |

### onRegistrationFailed

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

```
public abstract void onRegistrationFailed (String localProfileUri, 
                int errorCode, 
                String errorMessage)
```

Called when the registration failed.

<br />

|                                       Parameters                                       ||
|-------------------|---------------------------------------------------------------------|
| `localProfileUri` | `String`: the URI string of the SIP profile to register with <br /> |
| `errorCode`       | `int`: error code of this error <br />                              |
| `errorMessage`    | `String`: error message <br />                                      |

**See also:**

- [SipErrorCode](https://developer.android.com/reference/android/net/sip/SipErrorCode)