次の方法で共有


PackageInstaller.CreateSession(PackageInstaller+SessionParams) Method

Definition

Create a new session using the given parameters, returning a unique ID that represents the session.

[Android.Runtime.Register("createSession", "(Landroid/content/pm/PackageInstaller$SessionParams;)I", "GetCreateSession_Landroid_content_pm_PackageInstaller_SessionParams_Handler")]
public virtual int CreateSession (Android.Content.PM.PackageInstaller.SessionParams params);
[<Android.Runtime.Register("createSession", "(Landroid/content/pm/PackageInstaller$SessionParams;)I", "GetCreateSession_Landroid_content_pm_PackageInstaller_SessionParams_Handler")>]
abstract member CreateSession : Android.Content.PM.PackageInstaller.SessionParams -> int
override this.CreateSession : Android.Content.PM.PackageInstaller.SessionParams -> int

Parameters

Returns

positive, non-zero unique ID that represents the created session. This ID remains consistent across device reboots until the session is finalized. IDs are not reused during a given boot.

Attributes

Exceptions

if parameters were unsatisfiable, such as lack of disk space or unavailable media.

when installation services are unavailable, such as when called from a restricted user.

Remarks

Java documentation for android.content.pm.PackageInstaller.createSession(android.content.pm.SessionParams).

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.

Applies to