# ProfileInstallReceiver

# ProfileInstallReceiver

Artifact:[androidx.profileinstaller:profileinstaller](https://developer.android.com/jetpack/androidx/releases/profileinstaller)  
[View Source](https://cs.android.com/search?q=file:androidx/profileinstaller/ProfileInstallReceiver.java+class:androidx.profileinstaller.ProfileInstallReceiver)  
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/ProfileInstallReceiver "View this page in Java")

<br />

```
class ProfileInstallReceiver : BroadcastReceiver
```

<br />

|---|---|-----------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)                                                                        |||
| ↳ | [android.content.BroadcastReceiver](https://developer.android.com/reference/android/content/BroadcastReceiver.html)                                    ||
|   | ↳ | [androidx.profileinstaller.ProfileInstallReceiver](https://developer.android.com/reference/kotlin/androidx/profileinstaller/ProfileInstallReceiver) |

*** ** * ** ***

The[android.content.BroadcastReceiver](https://developer.android.com/reference/android/content/BroadcastReceiver.html)which forces a synchronous installation of the baseline profile. This is primarily used by tools to force a synchronous install of the baseline profile without starting the application's main activity. It is not expected for this receiver to be used at runtime by anything other than tools, and as such, the action filter is defined with the "dump" permission.

## Summary

|                                       ### Constants                                       |
|-------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | [ACTION_BENCHMARK_OPERATION](https://developer.android.com/reference/kotlin/androidx/profileinstaller/ProfileInstallReceiver#ACTION_BENCHMARK_OPERATION())` = "androidx.profileinstaller.action.BENCHMARK_OPERATION"` This is an action that triggers actions required for stable benchmarking from an external tool on user builds, such as clearing the code cache, or triggering garbage collection.       |
| `const `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | [ACTION_INSTALL_PROFILE](https://developer.android.com/reference/kotlin/androidx/profileinstaller/ProfileInstallReceiver#ACTION_INSTALL_PROFILE())` = "androidx.profileinstaller.action.INSTALL_PROFILE"` This is the action constant that this broadcast receiver responds to and installs a profile.                                                                                                        |
| `const `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | [ACTION_SAVE_PROFILE](https://developer.android.com/reference/kotlin/androidx/profileinstaller/ProfileInstallReceiver#ACTION_SAVE_PROFILE())` = "androidx.profileinstaller.action.SAVE_PROFILE"` This is the action constant for saving the current in-memory hot method data to a profile on disk.                                                                                                           |
| `const `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | [ACTION_SKIP_FILE](https://developer.android.com/reference/kotlin/androidx/profileinstaller/ProfileInstallReceiver#ACTION_SKIP_FILE())` = "androidx.profileinstaller.action.SKIP_FILE"` This is an action constant which requests that[ProfileInstaller](https://developer.android.com/reference/kotlin/androidx/profileinstaller/ProfileInstaller)manipulate the skip file used during profile installation. |

|                                                                ### Public constructors                                                                 |
|--------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ProfileInstallReceiver](https://developer.android.com/reference/kotlin/androidx/profileinstaller/ProfileInstallReceiver#ProfileInstallReceiver())`()` |

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onReceive](https://developer.android.com/reference/kotlin/androidx/profileinstaller/ProfileInstallReceiver#onReceive(android.content.Context,android.content.Intent))`(context: `[Context](https://developer.android.com/reference/android/content/Context.html)`, intent: `[Intent](https://developer.android.com/reference/android/content/Intent.html)`?)` |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[android.content.BroadcastReceiver](https://developer.android.com/reference/android/content/BroadcastReceiver.html) |------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                      | [abortBroadcast](https://developer.android.com/reference/android/content/BroadcastReceiver.html#abortBroadcast())`()`                                                                                                                                                                                                                                                                                                   | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                      | [clearAbortBroadcast](https://developer.android.com/reference/android/content/BroadcastReceiver.html#clearAbortBroadcast())`()`                                                                                                                                                                                                                                                                                         | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                | [getAbortBroadcast](https://developer.android.com/reference/android/content/BroadcastReceiver.html#getAbortBroadcast())`()`                                                                                                                                                                                                                                                                                             | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                | [getDebugUnregister](https://developer.android.com/reference/android/content/BroadcastReceiver.html#getDebugUnregister())`()`                                                                                                                                                                                                                                                                                           | | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                        | [getResultCode](https://developer.android.com/reference/android/content/BroadcastReceiver.html#getResultCode())`()`                                                                                                                                                                                                                                                                                                     | | [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!`                                               | [getResultData](https://developer.android.com/reference/android/content/BroadcastReceiver.html#getResultData())`()`                                                                                                                                                                                                                                                                                                     | | [Bundle](https://developer.android.com/reference/android/os/Bundle.html)`!`                                                        | [getResultExtras](https://developer.android.com/reference/android/content/BroadcastReceiver.html#getResultExtras(boolean))`(makeMap: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)`                                                                                                                                                                                            | | [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!`                                               | [getSentFromPackage](https://developer.android.com/reference/android/content/BroadcastReceiver.html#getSentFromPackage())`()`                                                                                                                                                                                                                                                                                           | | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                        | [getSentFromUid](https://developer.android.com/reference/android/content/BroadcastReceiver.html#getSentFromUid())`()`                                                                                                                                                                                                                                                                                                   | | [BroadcastReceiver.PendingResult](https://developer.android.com/reference/android/content/BroadcastReceiver.PendingResult.html)`!` | [goAsync](https://developer.android.com/reference/android/content/BroadcastReceiver.html#goAsync())`()`                                                                                                                                                                                                                                                                                                                 | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                | [isInitialStickyBroadcast](https://developer.android.com/reference/android/content/BroadcastReceiver.html#isInitialStickyBroadcast())`()`                                                                                                                                                                                                                                                                               | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                | [isOrderedBroadcast](https://developer.android.com/reference/android/content/BroadcastReceiver.html#isOrderedBroadcast())`()`                                                                                                                                                                                                                                                                                           | | [IBinder](https://developer.android.com/reference/android/os/IBinder.html)`!`                                                      | [peekService](https://developer.android.com/reference/android/content/BroadcastReceiver.html#peekService(android.content.Context, android.content.Intent))`(myContext: `[Context](https://developer.android.com/reference/android/content/Context.html)`!, service: `[Intent](https://developer.android.com/reference/android/content/Intent.html)`!)`                                                                  | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                      | [setDebugUnregister](https://developer.android.com/reference/android/content/BroadcastReceiver.html#setDebugUnregister(boolean))`(debug: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)`                                                                                                                                                                                        | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                      | [setOrderedHint](https://developer.android.com/reference/android/content/BroadcastReceiver.html#setOrderedHint(boolean))`(isOrdered: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)`                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                      | [setResult](https://developer.android.com/reference/android/content/BroadcastReceiver.html#setResult(int, java.lang.String, android.os.Bundle))`(code: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, data: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!, extras: `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`!)` | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                      | [setResultCode](https://developer.android.com/reference/android/content/BroadcastReceiver.html#setResultCode(int))`(code: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)`                                                                                                                                                                                                               | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                      | [setResultData](https://developer.android.com/reference/android/content/BroadcastReceiver.html#setResultData(java.lang.String))`(data: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!)`                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                      | [setResultExtras](https://developer.android.com/reference/android/content/BroadcastReceiver.html#setResultExtras(android.os.Bundle))`(extras: `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`!)`                                                                                                                                                                                             | |

## Constants

### ACTION_BENCHMARK_OPERATION

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

```
const val ACTION_BENCHMARK_OPERATION = "androidx.profileinstaller.action.BENCHMARK_OPERATION": String
```

This is an action that triggers actions required for stable benchmarking from an external tool on user builds, such as clearing the code cache, or triggering garbage collection.  

### ACTION_INSTALL_PROFILE

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

```
const val ACTION_INSTALL_PROFILE = "androidx.profileinstaller.action.INSTALL_PROFILE": String
```

This is the action constant that this broadcast receiver responds to and installs a profile.  

### ACTION_SAVE_PROFILE

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

```
const val ACTION_SAVE_PROFILE = "androidx.profileinstaller.action.SAVE_PROFILE": String
```

This is the action constant for saving the current in-memory hot method data to a profile on disk. This is to be used with compilation:

`cmd package compile -f -m speed-profile myPackageName`

And with profile extraction (API33+):

`pm dump-profiles --dump-classes-and-methods`  

### ACTION_SKIP_FILE

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

```
const val ACTION_SKIP_FILE = "androidx.profileinstaller.action.SKIP_FILE": String
```

This is an action constant which requests that[ProfileInstaller](https://developer.android.com/reference/kotlin/androidx/profileinstaller/ProfileInstaller)manipulate the skip file used during profile installation. This is only useful when the app is being instrumented when using Jetpack Macrobenchmarks.  

## Public constructors

### ProfileInstallReceiver

Added in 1.0.0  

```
ProfileInstallReceiver()
```  

## Public functions

### onReceive

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

```
fun onReceive(context: Context, intent: Intent?): Unit
```