PackageInstaller.WaitForInstallConstraints 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.
Similar to checkInstallConstraints(List,InstallConstraints,Executor,Consumer), but the callback is invoked only when the constraints are satisfied or after timeout.
[Android.Runtime.Register("waitForInstallConstraints", "(Ljava/util/List;Landroid/content/pm/PackageInstaller$InstallConstraints;Landroid/content/IntentSender;J)V", "GetWaitForInstallConstraints_Ljava_util_List_Landroid_content_pm_PackageInstaller_InstallConstraints_Landroid_content_IntentSender_JHandler", ApiSince=34)]
public virtual void WaitForInstallConstraints(System.Collections.Generic.IList<string> packageNames, Android.Content.PM.PackageInstaller.InstallConstraints constraints, Android.Content.IntentSender callback, long timeoutMillis);
[<Android.Runtime.Register("waitForInstallConstraints", "(Ljava/util/List;Landroid/content/pm/PackageInstaller$InstallConstraints;Landroid/content/IntentSender;J)V", "GetWaitForInstallConstraints_Ljava_util_List_Landroid_content_pm_PackageInstaller_InstallConstraints_Landroid_content_IntentSender_JHandler", ApiSince=34)>]
abstract member WaitForInstallConstraints : System.Collections.Generic.IList<string> * Android.Content.PM.PackageInstaller.InstallConstraints * Android.Content.IntentSender * int64 -> unit
override this.WaitForInstallConstraints : System.Collections.Generic.IList<string> * Android.Content.PM.PackageInstaller.InstallConstraints * Android.Content.IntentSender * int64 -> unit
Parameters
a list of package names to check the constraints for installation. This value cannot be null.
- constraints
- PackageInstaller.InstallConstraints
the constraints for installation. This value cannot be null.
- callback
- IntentSender
Called when the constraints are satisfied or after timeout. Intents sent to this callback contain: Intent.EXTRA_PACKAGES for the input package names, EXTRA_INSTALL_CONSTRAINTS for the input constraints, EXTRA_INSTALL_CONSTRAINTS_RESULT for the result. This value cannot be null.
- timeoutMillis
- Int64
The maximum time to wait, in milliseconds until the constraints are satisfied. Valid range is from 0 to one week. 0 means the callback will be invoked immediately no matter constraints are satisfied or not. Value is a non-negative duration in milliseconds.
- Attributes
Remarks
Similar to checkInstallConstraints(List,InstallConstraints,Executor,Consumer), but the callback is invoked only when the constraints are satisfied or after timeout. Note: the device idle constraint might take a long time to evaluate. The system will ensure the constraint is evaluated completely before handling timeout.
Android reference for android.content.pm.PackageInstaller.waitForInstallConstraints.
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.