# ActivityManager.RunningAppProcessInfo

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

# RunningAppProcessInfo

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/app/ActivityManager.RunningAppProcessInfo "View this page in Java")  

```
open class RunningAppProcessInfo : Parcelable
```

|---|--------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                         ||
| ↳ | [android.app.ActivityManager.RunningAppProcessInfo](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#) |

Information you can retrieve about a running process.

## Summary

|                                                                                                                                                                                                                                                                                                                                                           Constants                                                                                                                                                                                                                                                                                                                                                            ||
|----------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [IMPORTANCE_BACKGROUND](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_BACKGROUND:kotlin.Int) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [IMPORTANCE_CACHED](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_CACHED:kotlin.Int) Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int): This process contains cached code that is expendable, not actively running any app components we care about.                                                                                                                                                                                                                            |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [IMPORTANCE_CANT_SAVE_STATE](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_CANT_SAVE_STATE:kotlin.Int) Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int): This process is running an application that can not save its state, and thus can't be killed while in the background.                                                                                                                                                                                                 |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [IMPORTANCE_EMPTY](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_EMPTY:kotlin.Int) Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int): This process is empty of any actively running code.                                                                                                                                                                                                                                                                                       |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [IMPORTANCE_FOREGROUND](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_FOREGROUND:kotlin.Int) Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int): This process is running the foreground UI; that is, it is the thing currently at the top of the screen that the user is interacting with.                                                                                                                                                                                       |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [IMPORTANCE_FOREGROUND_SERVICE](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_FOREGROUND_SERVICE:kotlin.Int) Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int): This process is running a foreground service, for example to perform music playback even while the user is not immediately in the app.                                                                                                                                                                          |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [IMPORTANCE_GONE](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_GONE:kotlin.Int) Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int): This process does not exist.                                                                                                                                                                                                                                                                                                                |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [IMPORTANCE_PERCEPTIBLE](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_PERCEPTIBLE:kotlin.Int) Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int): This process is not something the user is directly aware of, but is otherwise perceptible to them to some degree.                                                                                                                                                                                                             |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [IMPORTANCE_PERCEPTIBLE_PRE_26](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_PERCEPTIBLE_PRE_26:kotlin.Int) Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int):[IMPORTANCE_PERCEPTIBLE](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_PERCEPTIBLE:kotlin.Int)had this wrong value before[Build.VERSION_CODES.O](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#O:kotlin.Int). |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [IMPORTANCE_SERVICE](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_SERVICE:kotlin.Int) Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int): This process contains services that should remain running.                                                                                                                                                                                                                                                                            |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [IMPORTANCE_TOP_SLEEPING](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_TOP_SLEEPING:kotlin.Int) Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int): This process is running the foreground UI, but the device is asleep so it is not visible to the user.                                                                                                                                                                                                                       |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [IMPORTANCE_TOP_SLEEPING_PRE_28](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_TOP_SLEEPING_PRE_28:kotlin.Int) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [IMPORTANCE_VISIBLE](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_VISIBLE:kotlin.Int) Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int): This process is running something that is actively visible to the user, though not in the immediate foreground.                                                                                                                                                                                                                       |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [REASON_PROVIDER_IN_USE](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#REASON_PROVIDER_IN_USE:kotlin.Int) Constant for[importanceReasonCode](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importanceReasonCode:kotlin.Int): one of the application's content providers is being used by another process.                                                                                                                                                                                                                              |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [REASON_SERVICE_IN_USE](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#REASON_SERVICE_IN_USE:kotlin.Int) Constant for[importanceReasonCode](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importanceReasonCode:kotlin.Int): one of the application's content providers is being used by another process.                                                                                                                                                                                                                                |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [REASON_UNKNOWN](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#REASON_UNKNOWN:kotlin.Int) Constant for[importanceReasonCode](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importanceReasonCode:kotlin.Int): nothing special has been specified for the reason for this level.                                                                                                                                                                                                                                                         |

| Inherited constants ||
|---|---|
| From class[Parcelable](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#) |----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR:kotlin.Int) <br /> Descriptor bit used with[describeContents()](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#describeContents()): indicates that the Parcelable object's flattened representation includes a file descriptor. <br />                                                                                                                                                                                                        | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int) <br /> Flag for use with[writeToParcel](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#writeToParcel(android.os.Parcel,%20kotlin.Int)): the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`". Some implementations may want to release resources at this point. <br /> | ||

|                                                                                                                                                                                                                                                                                Public constructors                                                                                                                                                                                                                                                                                ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [RunningAppProcessInfo](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#RunningAppProcessInfo())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [RunningAppProcessInfo](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#RunningAppProcessInfo(kotlin.String,%20kotlin.Int,%20kotlin.Array))`(`pProcessName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `pPid:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `pArr:` `[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!>!`)` <br /> |

|                                                                                                                                                                                                                 Public methods                                                                                                                                                                                                                 ||
|----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)   | [describeContents](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#describeContents())`()` <br />                                                                                                                                                                                                           |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [readFromParcel](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#readFromParcel(android.os.Parcel))`(`source:` `[Parcel](https://developer.android.com/reference/kotlin/android/os/Parcel.html#)!`)` <br />                                                                                                 |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [writeToParcel](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#writeToParcel(android.os.Parcel,%20kotlin.Int))`(`dest:` `[Parcel](https://developer.android.com/reference/kotlin/android/os/Parcel.html#)`, `flags:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> |

|                                                                                                                                                                                                                                                                                                                                                   Properties                                                                                                                                                                                                                                                                                                                                                    ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[Parcelable.Creator](https://developer.android.com/reference/kotlin/android/os/Parcelable.Creator.html#)\<[ActivityManager.RunningAppProcessInfo](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#)!\> | [CREATOR](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#CREATOR:android.os.Parcelable.Creator) <br />                                                                                                                                                                                                                                                                                         |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                                                                                                    | [importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int) The relative importance level that the system places on this process.                                                                                                                                                                                                                                       |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                                                                                                    | [importanceReasonCode](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importanceReasonCode:kotlin.Int) The reason for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int), if any.                                                                                                                             |
| [ComponentName](https://developer.android.com/reference/kotlin/android/content/ComponentName.html#)!                                                                                                                                                          | [importanceReasonComponent](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importanceReasonComponent:android.content.ComponentName) For the specified values of[importanceReasonCode](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importanceReasonCode:kotlin.Int), this is the name of the component that is being used in this process. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                                                                                                    | [importanceReasonPid](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importanceReasonPid:kotlin.Int) For the specified values of[importanceReasonCode](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importanceReasonCode:kotlin.Int), this is the process ID of the other process that is a client of this process.                        |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                                                                                                    | [lastTrimLevel](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#lastTrimLevel:kotlin.Int) Last memory trim level reported to the process: corresponds to the values supplied to[ComponentCallbacks2.onTrimMemory(int)](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2.html#onTrimMemory(kotlin.Int)).                                                       |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                                                                                                    | [lru](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#lru:kotlin.Int) An additional ordering within a particular[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int)category, providing finer-grained information about the relative utility of processes within a category.                                    |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                                                                                                    | [pid](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#pid:kotlin.Int) The pid of this process; 0 if none                                                                                                                                                                                                                                                                                        |
| [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)\<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!\>!                                                                                          | [pkgList](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#pkgList:kotlin.Array) All packages that have been loaded into the process.                                                                                                                                                                                                                                                            |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!                                                                                                                                                                             | [processName](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#processName:kotlin.String) The name of the process that this object is associated with                                                                                                                                                                                                                                            |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                                                                                                    | [uid](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#uid:kotlin.Int) The user id of this process.                                                                                                                                                                                                                                                                                              |

## Constants

### IMPORTANCE_BACKGROUND

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

```
static val IMPORTANCE_BACKGROUND: Int
```

**Deprecated:** *Renamed to[IMPORTANCE_CACHED](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_CACHED:kotlin.Int).*  

    Value: 400

### IMPORTANCE_CACHED

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

```
static val IMPORTANCE_CACHED: Int
```

Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int): This process contains cached code that is expendable, not actively running any app components we care about.  

    Value: 400

### IMPORTANCE_CANT_SAVE_STATE

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

```
static val IMPORTANCE_CANT_SAVE_STATE: Int
```

Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int): This process is running an application that can not save its state, and thus can't be killed while in the background. This will be used with apps that have[android.R.attr#cantSaveState](https://developer.android.com/reference/kotlin/android/R.attr.html#cantSaveState:kotlin.Int)set on their application tag.  

    Value: 350

### IMPORTANCE_EMPTY

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

```
static val IMPORTANCE_EMPTY: Int
```

**Deprecated:** *This value is no longer reported, use[IMPORTANCE_CACHED](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_CACHED:kotlin.Int)instead.*

Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int): This process is empty of any actively running code.  

    Value: 500

### IMPORTANCE_FOREGROUND

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

```
static val IMPORTANCE_FOREGROUND: Int
```

Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int): This process is running the foreground UI; that is, it is the thing currently at the top of the screen that the user is interacting with.  

    Value: 100

### IMPORTANCE_FOREGROUND_SERVICE

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

```
static val IMPORTANCE_FOREGROUND_SERVICE: Int
```

Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int): This process is running a foreground service, for example to perform music playback even while the user is not immediately in the app. This generally indicates that the process is doing something the user actively cares about.  

    Value: 125

### IMPORTANCE_GONE

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

```
static val IMPORTANCE_GONE: Int
```

Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int): This process does not exist.  

    Value: 1000

### IMPORTANCE_PERCEPTIBLE

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

```
static val IMPORTANCE_PERCEPTIBLE: Int
```

Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int): This process is not something the user is directly aware of, but is otherwise perceptible to them to some degree.  

    Value: 230

### IMPORTANCE_PERCEPTIBLE_PRE_26

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

```
static val IMPORTANCE_PERCEPTIBLE_PRE_26: Int
```

Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int):[IMPORTANCE_PERCEPTIBLE](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_PERCEPTIBLE:kotlin.Int)had this wrong value before[Build.VERSION_CODES.O](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#O:kotlin.Int). Since the[Build.VERSION_CODES.O](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#O:kotlin.Int)SDK, the value of[IMPORTANCE_PERCEPTIBLE](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_PERCEPTIBLE:kotlin.Int)has been fixed.

The system will return this value instead of[IMPORTANCE_PERCEPTIBLE](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_PERCEPTIBLE:kotlin.Int)on Android versions below[Build.VERSION_CODES.O](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#O:kotlin.Int).

On Android version[Build.VERSION_CODES.O](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#O:kotlin.Int)and later, this value will still be returned for apps with the target API level below[Build.VERSION_CODES.O](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#O:kotlin.Int). For apps targeting version[Build.VERSION_CODES.O](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#O:kotlin.Int)and later, the correct value[IMPORTANCE_PERCEPTIBLE](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_PERCEPTIBLE:kotlin.Int)will be returned.  

    Value: 130

### IMPORTANCE_SERVICE

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

```
static val IMPORTANCE_SERVICE: Int
```

Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int): This process contains services that should remain running. These are background services apps have started, not something the user is aware of, so they may be killed by the system relatively freely (though it is generally desired that they stay running as long as they want to).  

    Value: 300

### IMPORTANCE_TOP_SLEEPING

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

```
static val IMPORTANCE_TOP_SLEEPING: Int
```

Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int): This process is running the foreground UI, but the device is asleep so it is not visible to the user. Though the system will try hard to keep its process from being killed, in all other ways we consider it a kind of cached process, with the limitations that go along with that state: network access, running background services, etc.  

    Value: 325

### IMPORTANCE_TOP_SLEEPING_PRE_28

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

```
static val IMPORTANCE_TOP_SLEEPING_PRE_28: Int
```

**Deprecated:** *Pre-[android.os.Build.VERSION_CODES#P](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#P:kotlin.Int)version of[IMPORTANCE_TOP_SLEEPING](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_TOP_SLEEPING:kotlin.Int). As of Android[android.os.Build.VERSION_CODES#P](https://developer.android.com/reference/kotlin/android/os/Build.VERSION_CODES.html#P:kotlin.Int), this is considered much less important since we want to reduce what apps can do when the screen is off.*  

    Value: 150

### IMPORTANCE_VISIBLE

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

```
static val IMPORTANCE_VISIBLE: Int
```

Constant for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int): This process is running something that is actively visible to the user, though not in the immediate foreground. This may be running a window that is behind the current foreground (so paused and with its state saved, not interacting with the user, but visible to them to some degree); it may also be running other services under the system's control that it considers important.  

    Value: 200

### REASON_PROVIDER_IN_USE

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

```
static val REASON_PROVIDER_IN_USE: Int
```

Constant for[importanceReasonCode](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importanceReasonCode:kotlin.Int): one of the application's content providers is being used by another process. The pid of the client process is in[importanceReasonPid](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importanceReasonPid:kotlin.Int)and the target provider in this process is in[importanceReasonComponent](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importanceReasonComponent:android.content.ComponentName).  

    Value: 1

### REASON_SERVICE_IN_USE

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

```
static val REASON_SERVICE_IN_USE: Int
```

Constant for[importanceReasonCode](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importanceReasonCode:kotlin.Int): one of the application's content providers is being used by another process. The pid of the client process is in[importanceReasonPid](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importanceReasonPid:kotlin.Int)and the target provider in this process is in[importanceReasonComponent](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importanceReasonComponent:android.content.ComponentName).  

    Value: 2

### REASON_UNKNOWN

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

```
static val REASON_UNKNOWN: Int
```

Constant for[importanceReasonCode](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importanceReasonCode:kotlin.Int): nothing special has been specified for the reason for this level.  

    Value: 0

## Public constructors

### RunningAppProcessInfo

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

```
RunningAppProcessInfo()
```  

### RunningAppProcessInfo

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

```
RunningAppProcessInfo(
    pProcessName: String!, 
    pPid: Int, 
    pArr: Array<String!>!)
```

## Public methods

### describeContents

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

```
open fun describeContents(): Int
```

|                                                                                                                                                                               Return                                                                                                                                                                               ||
|----------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either`0`or[android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR:kotlin.Int) |

### readFromParcel

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

```
open fun readFromParcel(source: Parcel!): Unit
```  

### writeToParcel

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

```
open fun writeToParcel(
    dest: Parcel, 
    flags: Int
): Unit
```

|                                                                                                                                                                                                                                                                                     Parameters                                                                                                                                                                                                                                                                                     ||
|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `dest`  | [Parcel](https://developer.android.com/reference/kotlin/android/os/Parcel.html#):The Parcel in which the object should be written. This value cannot be`null`.                                                                                                                                                                                                                                                                                                                                                                                                            |
| `flags` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):Additional flags about how the object should be written. May be 0 or[PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int). Value is either`0`or a combination of[android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/kotlin/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int), and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |

## Properties

### CREATOR

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

```
static val CREATOR: Parcelable.Creator<ActivityManager.RunningAppProcessInfo!>
```  

### importance

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

```
var importance: Int
```

The relative importance level that the system places on this process. These constants are numbered so that "more important" values are always smaller than "less important" values.  
Value is[android.app.ActivityManager.RunningAppProcessInfo#IMPORTANCE_FOREGROUND](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_FOREGROUND:kotlin.Int),[android.app.ActivityManager.RunningAppProcessInfo#IMPORTANCE_FOREGROUND_SERVICE](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_FOREGROUND_SERVICE:kotlin.Int),[android.app.ActivityManager.RunningAppProcessInfo#IMPORTANCE_TOP_SLEEPING](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_TOP_SLEEPING:kotlin.Int),[android.app.ActivityManager.RunningAppProcessInfo#IMPORTANCE_VISIBLE](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_VISIBLE:kotlin.Int),[android.app.ActivityManager.RunningAppProcessInfo#IMPORTANCE_PERCEPTIBLE](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_PERCEPTIBLE:kotlin.Int),[android.app.ActivityManager.RunningAppProcessInfo#IMPORTANCE_CANT_SAVE_STATE](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_CANT_SAVE_STATE:kotlin.Int),[android.app.ActivityManager.RunningAppProcessInfo#IMPORTANCE_SERVICE](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_SERVICE:kotlin.Int),[android.app.ActivityManager.RunningAppProcessInfo#IMPORTANCE_CACHED](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_CACHED:kotlin.Int), or[android.app.ActivityManager.RunningAppProcessInfo#IMPORTANCE_GONE](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_GONE:kotlin.Int)  

### importanceReasonCode

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

```
var importanceReasonCode: Int
```

The reason for[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int), if any.  

### importanceReasonComponent

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

```
var importanceReasonComponent: ComponentName!
```

For the specified values of[importanceReasonCode](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importanceReasonCode:kotlin.Int), this is the name of the component that is being used in this process.  

### importanceReasonPid

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

```
var importanceReasonPid: Int
```

For the specified values of[importanceReasonCode](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importanceReasonCode:kotlin.Int), this is the process ID of the other process that is a client of this process. This will be 0 if no other process is using this one.  

### lastTrimLevel

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

```
var lastTrimLevel: Int
```

Last memory trim level reported to the process: corresponds to the values supplied to[ComponentCallbacks2.onTrimMemory(int)](https://developer.android.com/reference/kotlin/android/content/ComponentCallbacks2.html#onTrimMemory(kotlin.Int)).  

### lru

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

```
var lru: Int
```

An additional ordering within a particular[importance](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#importance:kotlin.Int)category, providing finer-grained information about the relative utility of processes within a category. This number means nothing except that a smaller values are more recently used (and thus more important). Currently an LRU value is only maintained for the[IMPORTANCE_CACHED](https://developer.android.com/reference/kotlin/android/app/ActivityManager.RunningAppProcessInfo#IMPORTANCE_CACHED:kotlin.Int)category, though others may be maintained in the future.  

### pid

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

```
var pid: Int
```

The pid of this process; 0 if none  

### pkgList

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

```
var pkgList: Array<String!>!
```

All packages that have been loaded into the process.  

### processName

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

```
var processName: String!
```

The name of the process that this object is associated with  

### uid

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

```
var uid: Int
```

The user id of this process.