InstallConstraints

A class to encapsulate constraints for installation.

Specifies the conditions to check against for the packages being installed. This can be used by app stores to deliver auto updates without disrupting the user experience (referred as gentle update) - for example, an app store might hold off updates when it find out the app to update is interacting with the user.

Takes effect only on API level >= 34 with InstallerType.SESSION_BASED installer type.

See also

Types

Link copied to clipboard
class Builder(timeoutMillis: Long)

Builder for InstallConstraints.

Link copied to clipboard
object Companion
Link copied to clipboard
sealed interface TimeoutStrategy : Serializable

Strategy for handling timeout when the constraints for installation were not satisfied.

Properties

Link copied to clipboard

This constraint requires the app in question is not in the foreground.

Link copied to clipboard

This constraint requires the app in question is not interacting with the user. User interaction includes:

Link copied to clipboard

This constraint requires the app in question is not top-visible to the user. A top-visible app is showing UI at the top of the screen that the user is interacting with.

Link copied to clipboard

This constraint requires the device is idle.

Link copied to clipboard

This constraint requires there is no ongoing call in the device.

Link copied to clipboard

The maximum time to wait, in milliseconds until the constraints are satisfied.

Link copied to clipboard

Strategy for handling timeout when the constraints were not satisfied.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String