# ProfileInstaller.DiagnosticsCallback

# ProfileInstaller.DiagnosticsCallback

Artifact:[androidx.profileinstaller:profileinstaller](https://developer.android.com/jetpack/androidx/releases/profileinstaller)  
[View Source](https://cs.android.com/search?q=file:androidx/profileinstaller/ProfileInstaller.java+class:androidx.profileinstaller.ProfileInstaller.DiagnosticsCallback)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/profileinstaller#1.0.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/profileinstaller/ProfileInstaller.DiagnosticsCallback "View this page in Java")

<br />

```
interface ProfileInstaller.DiagnosticsCallback
```

<br />

*** ** * ** ***

An object which can be passed to the ProfileInstaller which will receive information during the installation process which can be used for logging and telemetry.

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onDiagnosticReceived](https://developer.android.com/reference/kotlin/androidx/profileinstaller/ProfileInstaller.DiagnosticsCallback#onDiagnosticReceived(int,java.lang.Object))`(code: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, data: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)` The diagnostic method will get called 0 to many times during the installation process, and is passed a \[code\] and optionally \[data\] which provides some information around the install process. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onResultReceived](https://developer.android.com/reference/kotlin/androidx/profileinstaller/ProfileInstaller.DiagnosticsCallback#onResultReceived(int,java.lang.Object))`(code: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, data: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)` The result method will get called exactly once per installation, with a \[code\] indicating what the result of the installation was.                                                                        |

## Public functions

### onDiagnosticReceived

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/profileinstaller#1.0.0)  

```
fun onDiagnosticReceived(code: Int, data: Any?): Unit
```

The diagnostic method will get called 0 to many times during the installation process, and is passed a \[code\] and optionally \[data\] which provides some information around the install process.  

|                                       Parameters                                       |
|----------------------------------------------------------------------------------------|------------------------------------------------------------|
| `code: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)    | An int specifying which diagnostic situation has occurred. |
| `data: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?` | Optional data passed in that relates to the code passed.   |

### onResultReceived

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/profileinstaller#1.0.0)  

```
fun onResultReceived(code: Int, data: Any?): Unit
```

The result method will get called exactly once per installation, with a \[code\] indicating what the result of the installation was.  

|                                       Parameters                                       |
|----------------------------------------------------------------------------------------|-------------------------------------------------------------------|
| `code: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)    | An int specifying which result situation has occurred.            |
| `data: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?` | Optional data passed in that relates to the code that was passed. |