# IntegrityServiceException

<br />

```
public class IntegrityServiceException extends ApiException
```

<br />

|---|---|---|---|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html)                                                                                                                              |||||
| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)                                                                                                               ||||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html)                                                                                                                  |||
|   |   | ↳ | [com.google.android.gms.common.api.ApiException](https://developers.google.com/android/reference/com/google/android/gms/common/api/ApiException.html)                                                 ||
|   |   |   | ↳ | [com.google.android.play.core.integrity.IntegrityServiceException](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/IntegrityServiceException) |

*** ** * ** ***

An exception indicating something went wrong with the Integrity API.

See[getErrorCode](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/IntegrityServiceException#getErrorCode())for the specific problem.

## Summary

|                                                                                                                              ### Public constructors                                                                                                                               |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [IntegrityServiceException](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/IntegrityServiceException#IntegrityServiceException(int))`(int errorCode)` Constructs an`IntegrityServiceException`with the specified error code. |

|                                      ### Public methods                                      |
|----------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `synchronized `[Throwable](https://developer.android.com/reference/java/lang/Throwable.html) | [getCause](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/IntegrityServiceException#getCause())`()`                                                                                      |
| `int`                                                                                        | [getErrorCode](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/IntegrityServiceException#getErrorCode())`()` Returns the error code resulting from the operation.                         |
| `int`                                                                                        | [getStatusCode](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/IntegrityServiceException#getStatusCode())`()` Returns the error code resulting from the operation.                       |
| `boolean`                                                                                    | [isRemediable](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/IntegrityServiceException#isRemediable())`()` Returns whether the exception is remediable by the device integrity dialogs. |

|                                                                                                                                                                                                                                                                                                                                                ### Inherited fields                                                                                                                                                                                                                                                                                                                                                 |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[com.google.android.gms.common.api.ApiException](https://developers.google.com/android/reference/com/google/android/gms/common/api/ApiException.html) |-----------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------| | `final `[Status](https://developers.google.com/android/reference/com/google/android/gms/common/api/Status.html) | [mStatus](https://developers.google.com/android/reference/com/google/android/gms/common/api/ApiException.html#mStatus--) **This field is deprecated.** | |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ### Inherited methods                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[com.google.android.gms.common.api.ApiException](https://developers.google.com/android/reference/com/google/android/gms/common/api/ApiException.html) |---------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Status](https://developers.google.com/android/reference/com/google/android/gms/common/api/Status.html) | [getStatus](https://developers.google.com/android/reference/com/google/android/gms/common/api/ApiException.html#getStatus--)`()`                                              | | [String](https://developer.android.com/reference/java/lang/String.html)                                 | [getStatusMessage](https://developers.google.com/android/reference/com/google/android/gms/common/api/ApiException.html#getStatusMessage--)`()` **This method is deprecated.** |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| From[java.lang.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) |----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `synchronized final void`                                                                    | [addSuppressed](https://developer.android.com/reference/java/lang/Throwable.html#addSuppressed(java.lang.Throwable))`(`[Throwable](https://developer.android.com/reference/java/lang/Throwable.html)` p)` | | `synchronized `[Throwable](https://developer.android.com/reference/java/lang/Throwable.html) | [fillInStackTrace](https://developer.android.com/reference/java/lang/Throwable.html#fillInStackTrace())`()`                                                                                               | | [String](https://developer.android.com/reference/java/lang/String.html)                      | [getLocalizedMessage](https://developer.android.com/reference/java/lang/Throwable.html#getLocalizedMessage())`()`                                                                                         | | [String](https://developer.android.com/reference/java/lang/String.html)                      | [getMessage](https://developer.android.com/reference/java/lang/Throwable.html#getMessage())`()`                                                                                                           | | `StackTraceElement[]`                                                                        | [getStackTrace](https://developer.android.com/reference/java/lang/Throwable.html#getStackTrace())`()`                                                                                                     | | `synchronized final Throwable[]`                                                             | [getSuppressed](https://developer.android.com/reference/java/lang/Throwable.html#getSuppressed())`()`                                                                                                     | | `synchronized `[Throwable](https://developer.android.com/reference/java/lang/Throwable.html) | [initCause](https://developer.android.com/reference/java/lang/Throwable.html#initCause(java.lang.Throwable))`(`[Throwable](https://developer.android.com/reference/java/lang/Throwable.html)` p)`         | | `void`                                                                                       | [printStackTrace](https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace())`()`                                                                                                 | | `void`                                                                                       | [setStackTrace](https://developer.android.com/reference/java/lang/Throwable.html#setStackTrace(java.lang.StackTraceElement[]))`(StackTraceElement[] p)`                                                   | | [String](https://developer.android.com/reference/java/lang/String.html)                      | [toString](https://developer.android.com/reference/java/lang/Throwable.html#toString())`()`                                                                                                               | |

## Public constructors

### IntegrityServiceException

```
public IntegrityServiceException(int errorCode)
```

Constructs an`IntegrityServiceException`with the specified error code.  

|   Parameters    |
|-----------------|-----------------|
| `int errorCode` | the error code. |

## Public methods

### getCause

```
synchronized public Throwable getCause()
```  

### getErrorCode

```
public int getErrorCode()
```

Returns the error code resulting from the operation. The value is one of the constants in[IntegrityErrorCode](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode).  

### getStatusCode

```
public int getStatusCode()
```

Returns the error code resulting from the operation. The value is one of the constants in[IntegrityErrorCode](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode). getStatusCode() is not supported in IntegrityServiceExceptions, please use getErrorCode() instead.  

### isRemediable

```
public boolean isRemediable()
```

Returns whether the exception is remediable by the device integrity dialogs. See[IntegrityDialogTypeCode](https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityDialogTypeCode).

Since 1.5.0