PackageInstaller.Session.Commit(IntentSender) Method

Definition

Attempt to commit everything staged in this session.

[Android.Runtime.Register("commit", "(Landroid/content/IntentSender;)V", "GetCommit_Landroid_content_IntentSender_Handler")]
public virtual void Commit (Android.Content.IntentSender statusReceiver);
[<Android.Runtime.Register("commit", "(Landroid/content/IntentSender;)V", "GetCommit_Landroid_content_IntentSender_Handler")>]
abstract member Commit : Android.Content.IntentSender -> unit
override this.Commit : Android.Content.IntentSender -> unit

Parameters

statusReceiver
IntentSender

Called when the state of the session changes. Intents sent to this receiver contain #EXTRA_STATUS. Refer to the individual status codes on how to handle them.

Attributes

Remarks

Attempt to commit everything staged in this session. This may require user intervention, and so it may not happen immediately. The final result of the commit will be reported through the given callback.

Once this method is called, the session is sealed and no additional mutations may be performed on the session. In case of device reboot or data loader transient failure before the session has been finalized, you may commit the session again.

If the installer is the device owner, the affiliated profile owner, or has received user pre-approval of this session, there will be no user intervention.

Java documentation for android.content.pm.PackageInstaller.Session.commit(android.content.IntentSender).

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