public abstract static class PackageInstaller.SessionCallback extends Object
A typical session lifecycle looks like this:
Constructor and Description |
---|
SessionCallback() |
Modifier and Type | Method and Description |
---|---|
abstract void |
onActiveChanged(int sessionId,
boolean active)
Active state for session has been changed.
|
abstract void |
onBadgingChanged(int sessionId)
Badging details for an existing session has changed.
|
abstract void |
onCreated(int sessionId)
New session has been created.
|
abstract void |
onFinished(int sessionId,
boolean success)
Session has completely finished, either with success or failure.
|
abstract void |
onProgressChanged(int sessionId,
float progress)
Progress for given session has been updated.
|
public abstract void onCreated(int sessionId)
PackageInstaller.getSessionInfo(int)
.public abstract void onBadgingChanged(int sessionId)
public abstract void onActiveChanged(int sessionId, boolean 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
PackageInstaller.Session.commit(IntentSender)
.
If the installer closes the PackageInstaller.Session
without committing, the
session is considered inactive until the installer opens the session
again.
public abstract void onProgressChanged(int sessionId, float progress)
Note that this progress may not directly correspond to the value
reported by
PackageInstaller.Session.setStagingProgress(float)
, as the
system may carve out a portion of the overall progress to represent
its own internal installation work.
public abstract void onFinished(int sessionId, boolean success)