PackageInstaller.CreateSession(PackageInstaller+SessionParams) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
when PackageInstaller.SessionParams is invalid.
Remarks
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.