public static class PackageInstaller.SessionInfo
extends Object
implements Parcelable
java.lang.Object | |
↳ | android.content.pm.PackageInstaller.SessionInfo |
Details for an active install session.
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. |
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. |
void |
writeToParcel(Parcel dest, int flags) Flatten this object in to a Parcel. |
Inherited methods |
|
---|---|
![]() java.lang.Object
|
|
![]() android.os.Parcelable
|
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 |
See also:
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. |
Bitmap getAppIcon ()
Return an icon representing the app being installed. May be null
if unavailable.
Returns | |
---|---|
Bitmap |
CharSequence getAppLabel ()
Return a label representing the app being installed. May be null
if unavailable.
Returns | |
---|---|
CharSequence |
String getAppPackageName ()
Return the package name this session is working with. May be null
if unknown.
Returns | |
---|---|
String |
String getInstallerPackageName ()
Return the package name of the app that owns this session.
Returns | |
---|---|
String |
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 |
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 |
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 . |