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

# SessionInfo

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo "View this page in Java")

```
open class SessionInfo : Parcelable
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.content.pm.PackageInstaller.SessionInfo](https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#) |

Details for an active install session.

## Summary

| Constants ||
|---|---|
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#INVALID_ID:kotlin.Int` A session ID that does not exist or is invalid. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#SESSION_ACTIVATION_FAILED:kotlin.Int` Constant indicating that an error occurred during the activation phase of this session. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#SESSION_CONFLICT:kotlin.Int` Constant indicating that the session was in conflict with another session and had to be sacrificed for resolution. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#SESSION_NO_ERROR:kotlin.Int` Constant indicating that no error occurred during the preparation or the activation of this session. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#SESSION_UNKNOWN_ERROR:kotlin.Int` Constant indicating that an unknown error occurred while processing this session. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#SESSION_VERIFICATION_FAILED:kotlin.Int` Constant indicating that an error occurred during the verification phase of this session. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#STAGED_SESSION_ACTIVATION_FAILED:kotlin.Int` <br /> |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#STAGED_SESSION_CONFLICT:kotlin.Int` <br /> |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#STAGED_SESSION_NO_ERROR:kotlin.Int` <br /> |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#STAGED_SESSION_UNKNOWN:kotlin.Int` <br /> |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#STAGED_SESSION_VERIFICATION_FAILED:kotlin.Int` <br /> |

| Inherited constants ||
|---|---|
| From class `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#` |---|---| | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR:kotlin.Int` Descriptor bit used with `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor. <br /> | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int` Flag for use with `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 methods ||
|---|---|
| open [Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html#)? | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#createDetailsIntent()()` Return an Intent that can be started to view details about this install session. |
| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#describeContents()()` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| open [Bitmap](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.html#)? | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getAppIcon()()` Return an icon representing the app being installed. |
| open [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)? | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getAppLabel()()` Return a label representing the app being installed. |
| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getAppPackageName()()` Return the package name this session is working with. |
| open [IntArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getChildSessionIds()()` Returns the set of session IDs that will be committed when this session is committed if this session is a multi-package session. |
| open [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getCreatedMillis()()` The timestamp of the initial creation of the session. |
| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getDontKillApp()()` Get the value set in `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#setDontKillApp(kotlin.Boolean)`. |
| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getInstallLocation()()` Get the value set in `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#setInstallLocation(kotlin.Int)`. |
| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getInstallReason()()` Return the reason for installing this package. |
| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getInstallerAttributionTag()()` <br /> |
| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getInstallerPackageName()()` Return the package name of the app that owns this session. |
| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getInstallerUid()()` Returns the Uid of the owner of the session. |
| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getMode()()` Get the mode of the session as set in the constructor of the `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams`. |
| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getOriginatingUid()()` Get the value set in `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#setOriginatingUid(kotlin.Int)`. |
| open [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)? | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getOriginatingUri()()` Get the value set in `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#setOriginatingUri(android.net.Uri)`. |
| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getPackageSource()()` Get the package source that was set in `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#setPackageSource(kotlin.Int)`. |
| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getParentSessionId()()` Returns the parent multi-package session ID if this session belongs to one, `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#INVALID_ID:kotlin.Int` otherwise. |
| open [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getProgress()()` Return current overall progress of this session, between 0 and 1. |
| open [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)? | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getReferrerUri()()` Get the value set in `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#setReferrerUri(android.net.Uri)` Note: This value will only be non-null for the owner of the session. |
| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getRequireUserAction()()` Whether user action was required by the installer. |
| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getSessionId()()` Return the ID for this session. |
| open [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getSize()()` Get the value as set in `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#setSize(kotlin.Long)`. |
| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getStagedSessionErrorCode()()` If something went wrong with a staged session, clients can check this error code to understand which kind of failure happened. |
| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getStagedSessionErrorMessage()()` Text description of the error code returned by `getStagedSessionErrorCode`, or empty string if no error was encountered. |
| open [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getUpdatedMillis()()` The timestamp of the last update that occurred to the session, including changing of states in case of staged sessions. |
| open [UserHandle](https://developer.android.com/reference/kotlin/android/os/UserHandle.html#) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#getUser()()` Return the user associated with this session. |
| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#hasParentSessionId()()` Returns true if session has a valid parent session, otherwise false. |
| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#isActive()()` Return if this session is currently active. |
| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#isApplicationEnabledSettingPersistent()()` Returns `true` if this session will keep the existing application enabled setting after installation. |
| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#isAutoInstallDependenciesEnabled()()` Check whether missing SDK or static shared library dependencies should be automatically fetched and installed when installing an app that wants to use these dependencies. |
| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#isCommitted()()` Returns `true` if `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.Session#commit(android.content.IntentSender)`} was called for this session. |
| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#isMultiPackage()()` Returns true if this session is a multi-package session containing references to other sessions. |
| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#isPreApprovalRequested()()` Returns whether this session has requested user pre-approval. |
| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#isRequestUpdateOwnership()()` <br /> |
| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#isSealed()()` Return if this session is sealed. |
| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#isStaged()()` Returns true if this session is a staged session. |
| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#isStagedSessionActive()()` Returns `true` if this session is an active staged session. |
| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#isStagedSessionApplied()()` Whether the staged session has been applied successfully, meaning that all of its packages have been activated and no further action is required. |
| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#isStagedSessionFailed()()` Whether something went wrong and the staged session is declared as failed, meaning that it will be ignored at next reboot. |
| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#isStagedSessionReady()()` Whether the staged session is ready to be applied at next reboot. |
| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#isUnarchival()()` Returns true if the session is an unarchival. |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#writeToParcel(android.os.Parcel,%20kotlin.Int)(dest: https://developer.android.com/reference/kotlin/android/os/Parcel.html#, flags: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` Flatten this object in to a Parcel. |

| Properties ||
|---|---|
| static [Parcelable.Creator](https://developer.android.com/reference/kotlin/android/os/Parcelable.Creator.html#)\<[PackageInstaller.SessionInfo](https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#)!\>! | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#CREATOR:android.os.Parcelable.Creator` <br /> |

## Constants

### INVALID_ID

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

```
static val INVALID_ID: Int
```

A session ID that does not exist or is invalid.

    Value: -1

### SESSION_ACTIVATION_FAILED

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

```
static val SESSION_ACTIVATION_FAILED: Int
```

Constant indicating that an error occurred during the activation phase of this session.

    Value: 2

### SESSION_CONFLICT

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

```
static val SESSION_CONFLICT: Int
```

Constant indicating that the session was in conflict with another session and had to be sacrificed for resolution.

    Value: 4

### SESSION_NO_ERROR

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

```
static val SESSION_NO_ERROR: Int
```

Constant indicating that no error occurred during the preparation or the activation of this session.

    Value: 0

### SESSION_UNKNOWN_ERROR

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

```
static val SESSION_UNKNOWN_ERROR: Int
```

Constant indicating that an unknown error occurred while processing this session.

    Value: 3

### SESSION_VERIFICATION_FAILED

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

```
static val SESSION_VERIFICATION_FAILED: Int
```

Constant indicating that an error occurred during the verification phase of this session.

    Value: 1

### STAGED_SESSION_ACTIVATION_FAILED

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

```
static val STAGED_SESSION_ACTIVATION_FAILED: Int
```

**Deprecated:** *use `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#SESSION_ACTIVATION_FAILED:kotlin.Int`.*

    Value: 2

### STAGED_SESSION_CONFLICT

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

```
static val STAGED_SESSION_CONFLICT: Int
```

**Deprecated:** *use `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#SESSION_CONFLICT:kotlin.Int`.*

    Value: 4

### STAGED_SESSION_NO_ERROR

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

```
static val STAGED_SESSION_NO_ERROR: Int
```

**Deprecated:** *use `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#SESSION_NO_ERROR:kotlin.Int`.*

    Value: 0

### STAGED_SESSION_UNKNOWN

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

```
static val STAGED_SESSION_UNKNOWN: Int
```

**Deprecated:** *use `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#SESSION_UNKNOWN_ERROR:kotlin.Int`.*

    Value: 3

### STAGED_SESSION_VERIFICATION_FAILED

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

```
static val STAGED_SESSION_VERIFICATION_FAILED: Int
```

**Deprecated:** *use `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#SESSION_VERIFICATION_FAILED:kotlin.Int`.*

    Value: 1

## Public methods

### createDetailsIntent

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

```
open fun createDetailsIntent(): Intent?
```

Return an Intent that can be started to view details about this install session. This may surface actions such as pause, resume, or cancel.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/content/Intent.html#?` | This value may be `null`. |

**See Also**

- `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller#ACTION_SESSION_DETAILS:kotlin.String`

### describeContents

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

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

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#writeToParcel(android.os.Parcel,%20kotlin.Int)`, the return value of this method must include the `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR:kotlin.Int` bit.

| Return ||
|---|---|
| `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 - `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR:kotlin.Int` |

### getAppIcon

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

```
open fun getAppIcon(): Bitmap?
```

Return an icon representing the app being installed. May be `null` if unavailable.

### getAppLabel

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

```
open fun getAppLabel(): CharSequence?
```

Return a label representing the app being installed. May be `null` if unavailable.

### getAppPackageName

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

```
open fun getAppPackageName(): String?
```

Return the package name this session is working with. May be `null` if unknown.

### getChildSessionIds

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

```
open fun getChildSessionIds(): IntArray
```

Returns the set of session IDs that will be committed when this session is committed if this session is a multi-package session.

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html` | This value cannot be `null`. |

### getCreatedMillis

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

```
open fun getCreatedMillis(): Long
```

The timestamp of the initial creation of the session.

### getDontKillApp

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

```
open fun getDontKillApp(): Boolean
```

Get the value set in `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#setDontKillApp(kotlin.Boolean)`.

### getInstallLocation

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

```
open fun getInstallLocation(): Int
```

Get the value set in `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#setInstallLocation(kotlin.Int)`.

### getInstallReason

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

```
open fun getInstallReason(): Int
```

Return the reason for installing this package.

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | The install reason. Value is one of the following: - `https://developer.android.com/reference/kotlin/android/content/pm/PackageManager#INSTALL_REASON_UNKNOWN:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/content/pm/PackageManager#INSTALL_REASON_POLICY:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/content/pm/PackageManager#INSTALL_REASON_DEVICE_RESTORE:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/content/pm/PackageManager#INSTALL_REASON_DEVICE_SETUP:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/content/pm/PackageManager#INSTALL_REASON_USER:kotlin.Int` |

### getInstallerAttributionTag

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

```
open fun getInstallerAttributionTag(): String?
```

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/android/content/Context.html#getAttributionTag()` of the context that created this session. This value may be `null`. |

### getInstallerPackageName

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

```
open fun getInstallerPackageName(): String?
```

Return the package name of the app that owns this session.

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | This value may be `null`. |

### getInstallerUid

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

```
open fun getInstallerUid(): Int
```

Returns the Uid of the owner of the session.

### getMode

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

```
open fun getMode(): Int
```

Get the mode of the session as set in the constructor of the `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams`.

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | One of `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#MODE_FULL_INSTALL:kotlin.Int` or `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#MODE_INHERIT_EXISTING:kotlin.Int` |

### getOriginatingUid

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

```
open fun getOriginatingUid(): Int
```

Get the value set in `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#setOriginatingUid(kotlin.Int)`.

### getOriginatingUri

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

```
open fun getOriginatingUri(): Uri?
```

Get the value set in `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#setOriginatingUri(android.net.Uri)`. Note: This value will only be non-null for the owner of the session.

### getPackageSource

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

```
open fun getPackageSource(): Int
```

Get the package source that was set in `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#setPackageSource(kotlin.Int)`.

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | Value is one of the following: - `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller#PACKAGE_SOURCE_UNSPECIFIED:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller#PACKAGE_SOURCE_STORE:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller#PACKAGE_SOURCE_LOCAL_FILE:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller#PACKAGE_SOURCE_DOWNLOADED_FILE:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller#PACKAGE_SOURCE_OTHER:kotlin.Int` |

### getParentSessionId

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

```
open fun getParentSessionId(): Int
```

Returns the parent multi-package session ID if this session belongs to one, `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#INVALID_ID:kotlin.Int` otherwise.

### getProgress

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

```
open fun getProgress(): Float
```

Return current overall progress of this session, between 0 and 1.

Note that this progress may not directly correspond to the value reported by `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.Session#setStagingProgress(kotlin.Float)`, as the system may carve out a portion of the overall progress to represent its own internal installation work.

### getReferrerUri

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

```
open fun getReferrerUri(): Uri?
```

Get the value set in `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#setReferrerUri(android.net.Uri)` Note: This value will only be non-null for the owner of the session.

### getRequireUserAction

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

```
open fun getRequireUserAction(): Int
```

Whether user action was required by the installer.

Note: a return value of `USER_ACTION_NOT_REQUIRED` does not guarantee that the install will not result in user action.

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#USER_ACTION_NOT_REQUIRED:kotlin.Int`, `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#USER_ACTION_REQUIRED:kotlin.Int` or `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#USER_ACTION_UNSPECIFIED:kotlin.Int` Value is one of the following: - `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#USER_ACTION_UNSPECIFIED:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#USER_ACTION_REQUIRED:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#USER_ACTION_NOT_REQUIRED:kotlin.Int` |

### getSessionId

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

```
open fun getSessionId(): Int
```

Return the ID for this session.

### getSize

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

```
open fun getSize(): Long
```

Get the value as set in `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#setSize(kotlin.Long)`.

The value is a hint and does not have to match the actual size.

### getStagedSessionErrorCode

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

```
open fun getStagedSessionErrorCode(): Int
```

If something went wrong with a staged session, clients can check this error code to understand which kind of failure happened. Only meaningful if `isStaged` is true.

### getStagedSessionErrorMessage

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

```
open fun getStagedSessionErrorMessage(): String
```

Text description of the error code returned by `getStagedSessionErrorCode`, or empty string if no error was encountered.

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | This value cannot be `null`. |

### getUpdatedMillis

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

```
open fun getUpdatedMillis(): Long
```

The timestamp of the last update that occurred to the session, including changing of states in case of staged sessions.   
Value is a non-negative timestamp measured as the number of milliseconds since 1970-01-01T00:00:00Z.

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html` | Value is a non-negative timestamp measured as the number of milliseconds since 1970-01-01T00:00:00Z. |

### getUser

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

```
open fun getUser(): UserHandle
```

Return the user associated with this session.

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/os/UserHandle.html#` | This value cannot be `null`. |

### hasParentSessionId

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

```
open fun hasParentSessionId(): Boolean
```

Returns true if session has a valid parent session, otherwise false.

### isActive

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

```
open fun isActive(): Boolean
```

Return if this session is currently active.

A session is considered active whenever there is ongoing forward progress being made, such as the installer holding an open `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.Session` instance while streaming data into place, or the system optimizing code as the result of `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.Session#commit(android.content.IntentSender)`.

If the installer closes the `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.Session` without committing, the session is considered inactive until the installer opens the session again.

### isApplicationEnabledSettingPersistent

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

```
open fun isApplicationEnabledSettingPersistent(): Boolean
```

Returns `true` if this session will keep the existing application enabled setting after installation.

### isAutoInstallDependenciesEnabled

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

```
open fun isAutoInstallDependenciesEnabled(): Boolean
```

**Deprecated:** *The automatic dependency installation feature is no longer supported.*

Check whether missing SDK or static shared library dependencies should be automatically fetched and installed when installing an app that wants to use these dependencies.

Note that in the case of a multi-package installation session, no dependencies will be automatically installed even if this method returns true.

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | true if the dependencies will be auto-installed, false otherwise. |

### isCommitted

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

```
open fun isCommitted(): Boolean
```

Returns `true` if `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.Session#commit(android.content.IntentSender)`} was called for this session.

### isMultiPackage

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

```
open fun isMultiPackage(): Boolean
```

Returns true if this session is a multi-package session containing references to other sessions.

### isPreApprovalRequested

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

```
open fun isPreApprovalRequested(): Boolean
```

Returns whether this session has requested user pre-approval.

### isRequestUpdateOwnership

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

```
open fun isRequestUpdateOwnership(): Boolean
```

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `true` if the installer requested the update ownership enforcement for the packages in this session. |

**See Also**

- `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionParams#setRequestUpdateOwnership(kotlin.Boolean)`

### isSealed

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

```
open fun isSealed(): Boolean
```

Return if this session is sealed.

Once sealed, no further changes may be made to the session. A session is sealed the moment `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.Session#commit(android.content.IntentSender)` is called.

### isStaged

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

```
open fun isStaged(): Boolean
```

Returns true if this session is a staged session.

### isStagedSessionActive

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

```
open fun isStagedSessionActive(): Boolean
```

Returns `true` if this session is an active staged session. We consider a session active if it has been committed and it is either pending verification, or will be applied at next reboot.

Staged session is active iff:

- It is committed, i.e. `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#isCommitted()` is `true`, and
- it is not applied, i.e. `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#isStagedSessionApplied()` is `false`, and
- it is not failed, i.e. `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.SessionInfo#isStagedSessionFailed()` is `false`.

In case of a multi-package session, reasoning above is applied to the parent session, since that is the one that should have been `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller.Session#commit(android.content.IntentSender)`.

### isStagedSessionApplied

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

```
open fun isStagedSessionApplied(): Boolean
```

Whether the staged session has been applied successfully, meaning that all of its packages have been activated and no further action is required. Only meaningful if `isStaged` is true.

### isStagedSessionFailed

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

```
open fun isStagedSessionFailed(): Boolean
```

Whether something went wrong and the staged session is declared as failed, meaning that it will be ignored at next reboot. Only meaningful if `isStaged` is true.

### isStagedSessionReady

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

```
open fun isStagedSessionReady(): Boolean
```

Whether the staged session is ready to be applied at next reboot. Only meaningful if `isStaged` is true.

### isUnarchival

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

```
open fun isUnarchival(): Boolean
```

Returns true if the session is an unarchival.
**See Also**

- `https://developer.android.com/reference/kotlin/android/content/pm/PackageInstaller#requestUnarchive(kotlin.String,%20android.content.IntentSender)`

### writeToParcel

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

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

Flatten this object in to a Parcel.

| 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 `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/kotlin/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int` |

## Properties

### CREATOR

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

```
static val CREATOR: Parcelable.Creator<PackageInstaller.SessionInfo!>!
```