PackageInstaller.SessionInfo
public
static
class
PackageInstaller.SessionInfo
extends Object
implements
Parcelable
| java.lang.Object | |
| ↳ | android.content.pm.PackageInstaller.SessionInfo |
Details for an active install session.
Summary
Inherited constants |
|---|
android.os.Parcelable
|
Fields | |
|---|---|
public
static
final
Creator<PackageInstaller.SessionInfo> |
CREATOR
|
Public methods | |
|---|---|
Intent
|
createDetailsIntent()
Return an Intent that can be started to view details about this install session. |
int
|
describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
Bitmap
|
getAppIcon()
Return an icon representing the app being installed. |
CharSequence
|
getAppLabel()
Return a label representing the app being installed. |
String
|
getAppPackageName()
Return the package name this session is working with. |
int
|
getInstallReason()
Return the reason for installing this package. |
String
|
getInstallerPackageName()
Return the package name of the app that owns this session. |
float
|
getProgress()
Return current overall progress of this session, between 0 and 1. |
int
|
getSessionId()
Return the ID for this session. |
boolean
|
isActive()
Return if this session is currently active. |
boolean
|
isSealed()
Return if this session is sealed. |
void
|
writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel. |
Inherited methods | |
|---|---|
java.lang.Object
| |
android.os.Parcelable
| |
Fields
Public methods
createDetailsIntent
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.
| Returns | |
|---|---|
Intent |
This value may be |
See also:
describeContents
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(Parcel, int),
the return value of this method must include the
CONTENTS_FILE_DESCRIPTOR bit.
| Returns | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. |
getAppIcon
Bitmap getAppIcon ()
Return an icon representing the app being installed. May be null
if unavailable.
| Returns | |
|---|---|
Bitmap |
This value may be |
getAppLabel
CharSequence getAppLabel ()
Return a label representing the app being installed. May be null
if unavailable.
| Returns | |
|---|---|
CharSequence |
This value may be |
getAppPackageName
String getAppPackageName ()
Return the package name this session is working with. May be null
if unknown.
| Returns | |
|---|---|
String |
This value may be |
getInstallReason
int getInstallReason ()
Return the reason for installing this package.
| Returns | |
|---|---|
int |
The install reason.
Value is |
getInstallerPackageName
String getInstallerPackageName ()
Return the package name of the app that owns this session.
| Returns | |
|---|---|
String |
This value may be |
getProgress
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
setStagingProgress(float), as the
system may carve out a portion of the overall progress to represent
its own internal installation work.
| Returns | |
|---|---|
float |
|
isActive
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
PackageInstaller.Session instance while streaming data into place, or the
system optimizing code as the result of
commit(IntentSender).
If the installer closes the PackageInstaller.Session without committing, the
session is considered inactive until the installer opens the session
again.
| Returns | |
|---|---|
boolean |
|
isSealed
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 commit(IntentSender) is called.
| Returns | |
|---|---|
boolean |
|
writeToParcel
void writeToParcel (Parcel dest, int flags)
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: The Parcel in which the object should be written. |
flags |
int: Additional flags about how the object should be written.
May be 0 or PARCELABLE_WRITE_RETURN_VALUE.
|
Classes
- ActivityInfo
- ActivityInfo.WindowLayout
- ApplicationInfo
- ApplicationInfo.DisplayNameComparator
- ChangedPackages
- ComponentInfo
- ConfigurationInfo
- FeatureGroupInfo
- FeatureInfo
- InstrumentationInfo
- LabeledIntent
- LauncherActivityInfo
- LauncherApps
- LauncherApps.Callback
- LauncherApps.PinItemRequest
- LauncherApps.ShortcutQuery
- PackageInfo
- PackageInstaller
- PackageInstaller.Session
- PackageInstaller.SessionCallback
- PackageInstaller.SessionInfo
- PackageInstaller.SessionParams
- PackageItemInfo
- PackageItemInfo.DisplayNameComparator
- PackageManager
- PackageStats
- PathPermission
- PermissionGroupInfo
- PermissionInfo
- ProviderInfo
- ResolveInfo
- ResolveInfo.DisplayNameComparator
- ServiceInfo
- SharedLibraryInfo
- ShortcutInfo
- ShortcutInfo.Builder
- ShortcutManager
- Signature
- VersionedPackage
Exceptions