Udostępnij za pośrednictwem


PackageInstaller.SessionInfo Class

Definition

Details for an active install session.

[Android.Runtime.Register("android/content/pm/PackageInstaller$SessionInfo", DoNotGenerateAcw=true)]
public class PackageInstaller.SessionInfo : Java.Lang.Object, Android.OS.IParcelable, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/content/pm/PackageInstaller$SessionInfo", DoNotGenerateAcw=true)>]
type PackageInstaller.SessionInfo = class
    inherit Object
    interface IParcelable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
PackageInstaller.SessionInfo
Attributes
Implements

Remarks

Details for an active install session.

Java documentation for android.content.pm.PackageInstaller.SessionInfo.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

PackageInstaller.SessionInfo(IntPtr, JniHandleOwnership)

Fields

InvalidId

A session ID that does not exist or is invalid.

SessionActivationFailed
Obsolete.

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

SessionConflict
Obsolete.

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

SessionNoError
Obsolete.

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

SessionUnknownError
Obsolete.

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

SessionVerificationFailed
Obsolete.

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

StagedSessionActivationFailed

This member is deprecated.

StagedSessionConflict

This member is deprecated.

StagedSessionNoError

This member is deprecated.

StagedSessionUnknown

This member is deprecated.

StagedSessionVerificationFailed

This member is deprecated.

Properties

AppIcon

Return an icon representing the app being installed.

AppLabel
AppLabelFormatted

Return a label representing the app being installed.

AppPackageName

Return the package name this session is working with.

Class

Returns the runtime class of this Object.

(Inherited from Object)
CreatedMillis

The timestamp of the initial creation of the session.

Creator
DontKillApp

Get the value set in SessionParams#setDontKillApp(boolean).

Handle

The handle to the underlying Android instance.

(Inherited from Object)
HasParentSessionId

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

InstallerAttributionTag
InstallerPackageName

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

InstallerUid

Returns the Uid of the owner of the session.

InstallLocation

Get the value set in SessionParams#setInstallLocation(int).

InstallReason

Return the reason for installing this package.

IsActive

Return if this session is currently active.

IsApplicationEnabledSettingPersistent

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

IsCommitted

Returns true if Session#commit(IntentSender)} was called for this session.

IsMultiPackage

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

IsPreApprovalRequested

Returns whether this session has requested user pre-approval.

IsRequestUpdateOwnership
IsSealed

Return if this session is sealed.

IsStaged

Returns true if this session is a staged session.

IsStagedSessionActive

Returns true if this session is an active staged session.

IsStagedSessionApplied

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

IsStagedSessionFailed

Whether something went wrong and the staged session is declared as failed, meaning that it will be ignored at next reboot.

IsStagedSessionReady

Whether the staged session is ready to be applied at next reboot.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
Mode

Get the mode of the session as set in the constructor of the SessionParams.

OriginatingUid

Get the value set in SessionParams#setOriginatingUid(int).

OriginatingUri

Get the value set in SessionParams#setOriginatingUri(Uri).

PackageSource

Get the package source that was set in PackageInstaller.SessionParams#setPackageSource(int).

ParentSessionId

Returns the parent multi-package session ID if this session belongs to one, #INVALID_ID otherwise.

PeerReference (Inherited from Object)
Progress

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

ReferrerUri

Get the value set in SessionParams#setReferrerUri(Uri) Note: This value will only be non-null for the owner of the session.

RequireUserAction

Whether user action was required by the installer.

SessionId

Return the ID for this session.

Size

Get the value as set in SessionParams#setSize(long).

StagedSessionErrorCode

If something went wrong with a staged session, clients can check this error code to understand which kind of failure happened.

StagedSessionErrorMessage

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

ThresholdClass
ThresholdType
UpdatedMillis

The timestamp of the last update that occurred to the session, including changing of states in case of staged sessions.

User

Return the user associated with this session.

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
CreateDetailsIntent()

Return an Intent that can be started to view details about this install session.

DescribeContents()
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetChildSessionIds()

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

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
WriteToParcel(Parcel, ParcelableWriteFlags)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to