# PackageInstaller.SessionInfo

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Constants](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#constants)\|[Inherited Constants](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#inhconstants)\|[Fields](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#lfields)\|[Methods](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#inhmethods)  

# PackageInstaller.SessionInfo

*** ** * ** ***

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

`
public
static


class
PackageInstaller.SessionInfo
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


implements

`[Parcelable](https://developer.android.com/reference/android/os/Parcelable)`


`

|---|-------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.content.pm.PackageInstaller.SessionInfo |

<br />

*** ** * ** ***

Details for an active install session.

## Summary

|                                                                                                                                                                                 ### Constants                                                                                                                                                                                  ||
|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [INVALID_ID](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#INVALID_ID) A session ID that does not exist or is invalid.                                                                                                                                                                                                        |
| `int` | [SESSION_ACTIVATION_FAILED](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#SESSION_ACTIVATION_FAILED) Constant indicating that an error occurred during the activation phase of this session.                                                                                                                                  |
| `int` | [SESSION_CONFLICT](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#SESSION_CONFLICT) Constant indicating that the session was in conflict with another session and had to be sacrificed for resolution.                                                                                                                         |
| `int` | [SESSION_NO_ERROR](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#SESSION_NO_ERROR) Constant indicating that no error occurred during the preparation or the activation of this session.                                                                                                                                       |
| `int` | [SESSION_UNKNOWN_ERROR](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#SESSION_UNKNOWN_ERROR) Constant indicating that an unknown error occurred while processing this session.                                                                                                                                                |
| `int` | [SESSION_VERIFICATION_FAILED](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#SESSION_VERIFICATION_FAILED) Constant indicating that an error occurred during the verification phase of this session.                                                                                                                            |
| `int` | [STAGED_SESSION_ACTIVATION_FAILED](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#STAGED_SESSION_ACTIVATION_FAILED) *This constant was deprecated in API level 33. use[SESSION_ACTIVATION_FAILED](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#SESSION_ACTIVATION_FAILED).*         |
| `int` | [STAGED_SESSION_CONFLICT](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#STAGED_SESSION_CONFLICT) *This constant was deprecated in API level 33. use[SESSION_CONFLICT](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#SESSION_CONFLICT).*                                             |
| `int` | [STAGED_SESSION_NO_ERROR](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#STAGED_SESSION_NO_ERROR) *This constant was deprecated in API level 33. use[SESSION_NO_ERROR](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#SESSION_NO_ERROR).*                                             |
| `int` | [STAGED_SESSION_UNKNOWN](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#STAGED_SESSION_UNKNOWN) *This constant was deprecated in API level 33. use[SESSION_UNKNOWN_ERROR](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#SESSION_UNKNOWN_ERROR).*                                     |
| `int` | [STAGED_SESSION_VERIFICATION_FAILED](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#STAGED_SESSION_VERIFICATION_FAILED) *This constant was deprecated in API level 33. use[SESSION_VERIFICATION_FAILED](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#SESSION_VERIFICATION_FAILED).* |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ### Inherited constants                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From interface[android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable) |-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `int` | [CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR) Descriptor bit used with[describeContents()](https://developer.android.com/reference/android/os/Parcelable#describeContents()): indicates that the Parcelable object's flattened representation includes a file descriptor.                                                                                                                                            | | `int` | [PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE) Flag for use with[writeToParcel(Parcel, int)](https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)): 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)`". | |

|                                                                                                                                                                       ### Fields                                                                                                                                                                        ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| ` public static final `[Creator](https://developer.android.com/reference/android/os/Parcelable.Creator)`<`[PackageInstaller.SessionInfo](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo)`>` | [CREATOR](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#CREATOR) <br /> |

|                                                                                                                                                                                                                              ### Public methods                                                                                                                                                                                                                              ||
|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[Intent](https://developer.android.com/reference/android/content/Intent)       | ` `[createDetailsIntent](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#createDetailsIntent())`() ` Return an Intent that can be started to view details about this install session.                                                                                                                                                             |
| ` int`                                                                            | ` `[describeContents](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#describeContents())`() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.                                                                                                                                            |
| ` `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)      | ` `[getAppIcon](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getAppIcon())`() ` Return an icon representing the app being installed.                                                                                                                                                                                                           |
| ` `[CharSequence](https://developer.android.com/reference/java/lang/CharSequence) | ` `[getAppLabel](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getAppLabel())`() ` Return a label representing the app being installed.                                                                                                                                                                                                         |
| ` `[String](https://developer.android.com/reference/java/lang/String)             | ` `[getAppPackageName](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getAppPackageName())`() ` Return the package name this session is working with.                                                                                                                                                                                            |
| ` int[]`                                                                          | ` `[getChildSessionIds](https://developer.android.com/reference/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.                                                                                                               |
| ` long`                                                                           | ` `[getCreatedMillis](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getCreatedMillis())`() ` The timestamp of the initial creation of the session.                                                                                                                                                                                              |
| ` boolean`                                                                        | ` `[getDontKillApp](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getDontKillApp())`() ` Get the value set in[SessionParams.setDontKillApp(boolean)](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#setDontKillApp(boolean)).                                                                        |
| ` int`                                                                            | ` `[getInstallLocation](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getInstallLocation())`() ` Get the value set in[SessionParams.setInstallLocation(int)](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#setInstallLocation(int)).                                                                |
| ` int`                                                                            | ` `[getInstallReason](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getInstallReason())`() ` Return the reason for installing this package.                                                                                                                                                                                                     |
| ` `[String](https://developer.android.com/reference/java/lang/String)             | ` `[getInstallerAttributionTag](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getInstallerAttributionTag())`() `                                                                                                                                                                                                                                |
| ` `[String](https://developer.android.com/reference/java/lang/String)             | ` `[getInstallerPackageName](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getInstallerPackageName())`() ` Return the package name of the app that owns this session.                                                                                                                                                                           |
| ` int`                                                                            | ` `[getInstallerUid](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getInstallerUid())`() ` Returns the Uid of the owner of the session.                                                                                                                                                                                                         |
| ` int`                                                                            | ` `[getMode](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getMode())`() ` Get the mode of the session as set in the constructor of the[SessionParams](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams).                                                                                              |
| ` int`                                                                            | ` `[getOriginatingUid](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getOriginatingUid())`() ` Get the value set in[SessionParams.setOriginatingUid(int)](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#setOriginatingUid(int)).                                                                    |
| ` `[Uri](https://developer.android.com/reference/android/net/Uri)                 | ` `[getOriginatingUri](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getOriginatingUri())`() ` Get the value set in[SessionParams.setOriginatingUri(Uri)](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#setOriginatingUri(android.net.Uri)).                                                        |
| ` int`                                                                            | ` `[getPackageSource](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getPackageSource())`() ` Get the package source that was set in[PackageInstaller.SessionParams.setPackageSource(int)](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#setPackageSource(int)).                                     |
| ` int`                                                                            | ` `[getParentSessionId](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getParentSessionId())`() ` Returns the parent multi-package session ID if this session belongs to one,[INVALID_ID](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#INVALID_ID)otherwise.                                          |
| ` float`                                                                          | ` `[getProgress](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getProgress())`() ` Return current overall progress of this session, between 0 and 1.                                                                                                                                                                                            |
| ` `[Uri](https://developer.android.com/reference/android/net/Uri)                 | ` `[getReferrerUri](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getReferrerUri())`() ` Get the value set in[SessionParams.setReferrerUri(Uri)](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#setReferrerUri(android.net.Uri))Note: This value will only be non-null for the owner of the session. |
| ` int`                                                                            | ` `[getRequireUserAction](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getRequireUserAction())`() ` Whether user action was required by the installer.                                                                                                                                                                                         |
| ` int`                                                                            | ` `[getSessionId](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getSessionId())`() ` Return the ID for this session.                                                                                                                                                                                                                            |
| ` long`                                                                           | ` `[getSize](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getSize())`() ` Get the value as set in[SessionParams.setSize(long)](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#setSize(long)).                                                                                                       |
| ` int`                                                                            | ` `[getStagedSessionErrorCode](https://developer.android.com/reference/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.                                                                                                   |
| ` `[String](https://developer.android.com/reference/java/lang/String)             | ` `[getStagedSessionErrorMessage](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getStagedSessionErrorMessage())`() ` Text description of the error code returned by`getStagedSessionErrorCode`, or empty string if no error was encountered.                                                                                                    |
| ` long`                                                                           | ` `[getUpdatedMillis](https://developer.android.com/reference/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.                                                                                                                            |
| ` `[UserHandle](https://developer.android.com/reference/android/os/UserHandle)    | ` `[getUser](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#getUser())`() ` Return the user associated with this session.                                                                                                                                                                                                                        |
| ` boolean`                                                                        | ` `[hasParentSessionId](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#hasParentSessionId())`() ` Returns true if session has a valid parent session, otherwise false.                                                                                                                                                                           |
| ` boolean`                                                                        | ` `[isActive](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#isActive())`() ` Return if this session is currently active.                                                                                                                                                                                                                        |
| ` boolean`                                                                        | ` `[isApplicationEnabledSettingPersistent](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#isApplicationEnabledSettingPersistent())`() ` Returns`true`if this session will keep the existing application enabled setting after installation.                                                                                                      |
| ` boolean`                                                                        | ` `[isAutoInstallDependenciesEnabled](https://developer.android.com/reference/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.                                         |
| ` boolean`                                                                        | ` `[isCommitted](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#isCommitted())`() ` Returns`true`if[Session.commit(IntentSender)](https://developer.android.com/reference/android/content/pm/PackageInstaller.Session#commit(android.content.IntentSender))} was called for this session.                                                        |
| ` boolean`                                                                        | ` `[isMultiPackage](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#isMultiPackage())`() ` Returns true if this session is a multi-package session containing references to other sessions.                                                                                                                                                       |
| ` boolean`                                                                        | ` `[isPreApprovalRequested](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#isPreApprovalRequested())`() ` Returns whether this session has requested user pre-approval.                                                                                                                                                                          |
| ` boolean`                                                                        | ` `[isRequestUpdateOwnership](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#isRequestUpdateOwnership())`() `                                                                                                                                                                                                                                    |
| ` boolean`                                                                        | ` `[isSealed](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#isSealed())`() ` Return if this session is sealed.                                                                                                                                                                                                                                  |
| ` boolean`                                                                        | ` `[isStaged](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#isStaged())`() ` Returns true if this session is a staged session.                                                                                                                                                                                                                  |
| ` boolean`                                                                        | ` `[isStagedSessionActive](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#isStagedSessionActive())`() ` Returns`true`if this session is an active staged session.                                                                                                                                                                                |
| ` boolean`                                                                        | ` `[isStagedSessionApplied](https://developer.android.com/reference/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.                                                                                      |
| ` boolean`                                                                        | ` `[isStagedSessionFailed](https://developer.android.com/reference/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.                                                                                                               |
| ` boolean`                                                                        | ` `[isStagedSessionReady](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#isStagedSessionReady())`() ` Whether the staged session is ready to be applied at next reboot.                                                                                                                                                                          |
| ` boolean`                                                                        | ` `[isUnarchival](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#isUnarchival())`() ` Returns true if the session is an unarchival.                                                                                                                                                                                                              |
| ` void`                                                                           | ` `[writeToParcel](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#writeToParcel(android.os.Parcel,%20int))`(`[Parcel](https://developer.android.com/reference/android/os/Parcel)` dest, int flags) ` Flatten this object in to a Parcel.                                                                                                         |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||
| From interface` `[android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable)` ` |------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract int`  | ` `[describeContents](https://developer.android.com/reference/android/os/Parcelable#describeContents())`() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.                                    | | ` abstract void` | ` `[writeToParcel](https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int))`(`[Parcel](https://developer.android.com/reference/android/os/Parcel)` dest, int flags) ` Flatten this object in to a Parcel. | ||

## Constants

### INVALID_ID

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

```
public static final int INVALID_ID
```

A session ID that does not exist or is invalid.

<br />

Constant Value: -1 (0xffffffff)  

### SESSION_ACTIVATION_FAILED

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

```
public static final int SESSION_ACTIVATION_FAILED
```

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

<br />

Constant Value: 2 (0x00000002)  

### SESSION_CONFLICT

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

```
public static final int SESSION_CONFLICT
```

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

<br />

Constant Value: 4 (0x00000004)  

### SESSION_NO_ERROR

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

```
public static final int SESSION_NO_ERROR
```

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

<br />

Constant Value: 0 (0x00000000)  

### SESSION_UNKNOWN_ERROR

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

```
public static final int SESSION_UNKNOWN_ERROR
```

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

<br />

Constant Value: 3 (0x00000003)  

### SESSION_VERIFICATION_FAILED

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

```
public static final int SESSION_VERIFICATION_FAILED
```

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

<br />

Constant Value: 1 (0x00000001)  

### STAGED_SESSION_ACTIVATION_FAILED

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

```
public static final int STAGED_SESSION_ACTIVATION_FAILED
```

<br />

**This constant was deprecated in API level 33.**   
use[SESSION_ACTIVATION_FAILED](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#SESSION_ACTIVATION_FAILED).

<br />

<br />

Constant Value: 2 (0x00000002)  

### STAGED_SESSION_CONFLICT

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

```
public static final int STAGED_SESSION_CONFLICT
```

<br />

**This constant was deprecated in API level 33.**   
use[SESSION_CONFLICT](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#SESSION_CONFLICT).

<br />

<br />

Constant Value: 4 (0x00000004)  

### STAGED_SESSION_NO_ERROR

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

```
public static final int STAGED_SESSION_NO_ERROR
```

<br />

**This constant was deprecated in API level 33.**   
use[SESSION_NO_ERROR](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#SESSION_NO_ERROR).

<br />

<br />

Constant Value: 0 (0x00000000)  

### STAGED_SESSION_UNKNOWN

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

```
public static final int STAGED_SESSION_UNKNOWN
```

<br />

**This constant was deprecated in API level 33.**   
use[SESSION_UNKNOWN_ERROR](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#SESSION_UNKNOWN_ERROR).

<br />

<br />

Constant Value: 3 (0x00000003)  

### STAGED_SESSION_VERIFICATION_FAILED

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

```
public static final int STAGED_SESSION_VERIFICATION_FAILED
```

<br />

**This constant was deprecated in API level 33.**   
use[SESSION_VERIFICATION_FAILED](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#SESSION_VERIFICATION_FAILED).

<br />

<br />

Constant Value: 1 (0x00000001)

## Fields

### CREATOR

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

```
public static final Creator<PackageInstaller.SessionInfo> CREATOR
```

<br />

<br />

## Public methods

### createDetailsIntent

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

```
public Intent createDetailsIntent ()
```

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.

<br />

|                                                  Returns                                                  ||
|--------------------------------------------------------------------------|---------------------------------|
| [Intent](https://developer.android.com/reference/android/content/Intent) | This value may be`null`. <br /> |

**See also:**

- [PackageInstaller.ACTION_SESSION_DETAILS](https://developer.android.com/reference/android/content/pm/PackageInstaller#ACTION_SESSION_DETAILS)  

### describeContents

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

```
public int describeContents ()
```

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[writeToParcel(android.os.Parcel, int)](https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)), the return value of this method must include the[CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR)bit.

<br />

|                                                                                                                         Returns                                                                                                                         ||
|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either`0`or[CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR) <br /> |

### getAppIcon

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

```
public Bitmap getAppIcon ()
```

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

<br />

|                                      Returns                                      ||
|---------------------------------------------------------------------------|--------|
| [Bitmap](https://developer.android.com/reference/android/graphics/Bitmap) | <br /> |

### getAppLabel

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

```
public CharSequence getAppLabel ()
```

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

<br />

|                                        Returns                                         ||
|--------------------------------------------------------------------------------|--------|
| [CharSequence](https://developer.android.com/reference/java/lang/CharSequence) | <br /> |

### getAppPackageName

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

```
public String getAppPackageName ()
```

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

<br />

|                                  Returns                                   ||
|--------------------------------------------------------------------|--------|
| [String](https://developer.android.com/reference/java/lang/String) | <br /> |

### getChildSessionIds

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

```
public int[] getChildSessionIds ()
```

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

<br />

|                   Returns                   ||
|---------|------------------------------------|
| `int[]` | This value cannot be`null`. <br /> |

### getCreatedMillis

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

```
public long getCreatedMillis ()
```

The timestamp of the initial creation of the session.

<br />

|    Returns     ||
|--------|--------|
| `long` | <br /> |

### getDontKillApp

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

```
public boolean getDontKillApp ()
```

Get the value set in[SessionParams.setDontKillApp(boolean)](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#setDontKillApp(boolean)).

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### getInstallLocation

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

```
public int getInstallLocation ()
```

Get the value set in[SessionParams.setInstallLocation(int)](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#setInstallLocation(int)).

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getInstallReason

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

```
public int getInstallReason ()
```

Return the reason for installing this package.

<br />

|                                                                                                                                                                                                                                                                                                                                                                                                                  Returns                                                                                                                                                                                                                                                                                                                                                                                                                  ||
|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | The install reason. Value is[PackageManager.INSTALL_REASON_UNKNOWN](https://developer.android.com/reference/android/content/pm/PackageManager#INSTALL_REASON_UNKNOWN),[PackageManager.INSTALL_REASON_POLICY](https://developer.android.com/reference/android/content/pm/PackageManager#INSTALL_REASON_POLICY),[PackageManager.INSTALL_REASON_DEVICE_RESTORE](https://developer.android.com/reference/android/content/pm/PackageManager#INSTALL_REASON_DEVICE_RESTORE),[PackageManager.INSTALL_REASON_DEVICE_SETUP](https://developer.android.com/reference/android/content/pm/PackageManager#INSTALL_REASON_DEVICE_SETUP),[PackageManager.INSTALL_REASON_USER](https://developer.android.com/reference/android/content/pm/PackageManager#INSTALL_REASON_USER), or android.content.pm.PackageManager.INSTALL_REASON_ROLLBACK <br /> |

### getInstallerAttributionTag

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

```
public String getInstallerAttributionTag ()
```

<br />

<br />

|                                                                                                                      Returns                                                                                                                       ||
|--------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | [attribution tag](https://developer.android.com/reference/android/content/Context#getAttributionTag())of the context that created this session This value may be`null`. <br /> |

### getInstallerPackageName

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

```
public String getInstallerPackageName ()
```

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

<br />

|                                               Returns                                               ||
|--------------------------------------------------------------------|---------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | This value may be`null`. <br /> |

### getInstallerUid

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

```
public int getInstallerUid ()
```

Returns the Uid of the owner of the session.

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getMode

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

```
public int getMode ()
```

Get the mode of the session as set in the constructor of the[SessionParams](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams).

<br />

|                                                                                                                                                          Returns                                                                                                                                                           ||
|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | One of[SessionParams.MODE_FULL_INSTALL](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#MODE_FULL_INSTALL)or[SessionParams.MODE_INHERIT_EXISTING](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#MODE_INHERIT_EXISTING) <br /> |

### getOriginatingUid

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

```
public int getOriginatingUid ()
```

Get the value set in[SessionParams.setOriginatingUid(int)](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#setOriginatingUid(int)).

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getOriginatingUri

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

```
public Uri getOriginatingUri ()
```

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

<br />

|                                Returns                                 ||
|----------------------------------------------------------------|--------|
| [Uri](https://developer.android.com/reference/android/net/Uri) | <br /> |

### getPackageSource

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

```
public int getPackageSource ()
```

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

<br />

|                                                                                                                                                                                                                                                                                                                                                                                       Returns                                                                                                                                                                                                                                                                                                                                                                                        ||
|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | Value is[PackageInstaller.PACKAGE_SOURCE_UNSPECIFIED](https://developer.android.com/reference/android/content/pm/PackageInstaller#PACKAGE_SOURCE_UNSPECIFIED),[PackageInstaller.PACKAGE_SOURCE_STORE](https://developer.android.com/reference/android/content/pm/PackageInstaller#PACKAGE_SOURCE_STORE),[PackageInstaller.PACKAGE_SOURCE_LOCAL_FILE](https://developer.android.com/reference/android/content/pm/PackageInstaller#PACKAGE_SOURCE_LOCAL_FILE),[PackageInstaller.PACKAGE_SOURCE_DOWNLOADED_FILE](https://developer.android.com/reference/android/content/pm/PackageInstaller#PACKAGE_SOURCE_DOWNLOADED_FILE), or[PackageInstaller.PACKAGE_SOURCE_OTHER](https://developer.android.com/reference/android/content/pm/PackageInstaller#PACKAGE_SOURCE_OTHER) <br /> |

### getParentSessionId

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

```
public int getParentSessionId ()
```

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

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getProgress

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

```
public float getProgress ()
```

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

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

<br />

|     Returns     ||
|---------|--------|
| `float` | <br /> |

### getReferrerUri

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

```
public Uri getReferrerUri ()
```

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

<br />

|                                Returns                                 ||
|----------------------------------------------------------------|--------|
| [Uri](https://developer.android.com/reference/android/net/Uri) | <br /> |

### getRequireUserAction

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

```
public int getRequireUserAction ()
```

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.

<br />

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Returns                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ||
|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [SessionParams.USER_ACTION_NOT_REQUIRED](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#USER_ACTION_NOT_REQUIRED),[SessionParams.USER_ACTION_REQUIRED](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#USER_ACTION_REQUIRED)or[SessionParams.USER_ACTION_UNSPECIFIED](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#USER_ACTION_UNSPECIFIED)Value is[PackageInstaller.SessionParams.USER_ACTION_UNSPECIFIED](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#USER_ACTION_UNSPECIFIED),[PackageInstaller.SessionParams.USER_ACTION_REQUIRED](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#USER_ACTION_REQUIRED), or[PackageInstaller.SessionParams.USER_ACTION_NOT_REQUIRED](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#USER_ACTION_NOT_REQUIRED) <br /> |

### getSessionId

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

```
public int getSessionId ()
```

Return the ID for this session.

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getSize

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

```
public long getSize ()
```

Get the value as set in[SessionParams.setSize(long)](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#setSize(long)).

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

<br />

|    Returns     ||
|--------|--------|
| `long` | <br /> |

### getStagedSessionErrorCode

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

```
public int getStagedSessionErrorCode ()
```

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.

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getStagedSessionErrorMessage

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

```
public String getStagedSessionErrorMessage ()
```

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

<br />

|                                                Returns                                                 ||
|--------------------------------------------------------------------|------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | This value cannot be`null`. <br /> |

### getUpdatedMillis

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

```
public long getUpdatedMillis ()
```

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.

<br />

|                                                       Returns                                                       ||
|--------|-------------------------------------------------------------------------------------------------------------|
| `long` | Value is a non-negative timestamp measured as the number of milliseconds since 1970-01-01T00:00:00Z. <br /> |

### getUser

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

```
public UserHandle getUser ()
```

Return the user associated with this session.

<br />

|                                                     Returns                                                     ||
|-----------------------------------------------------------------------------|------------------------------------|
| [UserHandle](https://developer.android.com/reference/android/os/UserHandle) | This value cannot be`null`. <br /> |

### hasParentSessionId

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

```
public boolean hasParentSessionId ()
```

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

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### isActive

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

```
public boolean isActive ()
```

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[Session](https://developer.android.com/reference/android/content/pm/PackageInstaller.Session)instance while streaming data into place, or the system optimizing code as the result of[Session.commit(IntentSender)](https://developer.android.com/reference/android/content/pm/PackageInstaller.Session#commit(android.content.IntentSender)).

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

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### isApplicationEnabledSettingPersistent

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

```
public boolean isApplicationEnabledSettingPersistent ()
```

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

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### isAutoInstallDependenciesEnabled

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

```
public boolean 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.

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

<br />

|                                       Returns                                       ||
|-----------|--------------------------------------------------------------------------|
| `boolean` | true if the dependencies will be auto-installed, false otherwise. <br /> |

### isCommitted

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

```
public boolean isCommitted ()
```

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

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### isMultiPackage

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

```
public boolean isMultiPackage ()
```

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

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### isPreApprovalRequested

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

```
public boolean isPreApprovalRequested ()
```

Returns whether this session has requested user pre-approval.

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### isRequestUpdateOwnership

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

```
public boolean isRequestUpdateOwnership ()
```

<br />

<br />

|                                                        Returns                                                        ||
|-----------|------------------------------------------------------------------------------------------------------------|
| `boolean` | `true`if the installer requested the update ownership enforcement for the packages in this session. <br /> |

**See also:**

- [PackageInstaller.SessionParams.setRequestUpdateOwnership(boolean)](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#setRequestUpdateOwnership(boolean))  

### isSealed

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

```
public boolean isSealed ()
```

Return if this session is sealed.

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

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### isStaged

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

```
public boolean isStaged ()
```

Returns true if this session is a staged session.

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### isStagedSessionActive

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

```
public boolean isStagedSessionActive ()
```

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.[SessionInfo.isCommitted()](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#isCommitted())is`true`, and
- it is not applied, i.e.[SessionInfo.isStagedSessionApplied()](https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionInfo#isStagedSessionApplied())is`false`, and
- it is not failed, i.e.[SessionInfo.isStagedSessionFailed()](https://developer.android.com/reference/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[committed](https://developer.android.com/reference/android/content/pm/PackageInstaller.Session#commit(android.content.IntentSender)).

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### isStagedSessionApplied

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

```
public boolean isStagedSessionApplied ()
```

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.

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### isStagedSessionFailed

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

```
public boolean isStagedSessionFailed ()
```

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.

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### isStagedSessionReady

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

```
public boolean isStagedSessionReady ()
```

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

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### isUnarchival

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

```
public boolean isUnarchival ()
```

Returns true if the session is an unarchival.

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

**See also:**

- [PackageInstaller.requestUnarchive(String, IntentSender)](https://developer.android.com/reference/android/content/pm/PackageInstaller#requestUnarchive(java.lang.String,%20android.content.IntentSender))  

### writeToParcel

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

```
public void writeToParcel (Parcel dest, 
                int flags)
```

Flatten this object in to a Parcel.

<br />

|                                                                                                                                                                                                                               Parameters                                                                                                                                                                                                                                ||
|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `dest`  | `Parcel`: The Parcel in which the object should be written. This value cannot be`null`. <br />                                                                                                                                                                                                                                                                                                                                                                 |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or[Parcelable.PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE). Value is either`0`or a combination of[Parcelable.PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE), and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES <br /> |