Constraints

class Constraints
kotlin.Any
   ↳ androidx.work.Constraints

The constraints that can be applied to one WorkRequest.

Summary

Nested classes

Builder for Constraints class.

Public constructors

Public methods
Int

Boolean

Boolean
equals(other: Any?)

Boolean

Unit
setRequiredNetworkType(requiredNetworkType: NetworkType)

Unit
setRequiresBatteryNotLow(requiresBatteryNotLow: Boolean)

NetworkType

Unit

Unit
setRequiresCharging(requiresCharging: Boolean)

Boolean

Unit
setRequiresDeviceIdle(requiresDeviceIdle: Boolean)

Unit
setRequiresStorageNotLow(requiresStorageNotLow: Boolean)

Boolean

ContentUriTriggers!

Boolean

Properties
static Constraints!

Public constructors

<init>

Constraints()

Public methods

hashCode

fun hashCode(): Int

requiresDeviceIdle

fun requiresDeviceIdle(): Boolean
Return
Boolean: If the constraints require device idle.

equals

fun equals(other: Any?): Boolean

requiresStorageNotLow

fun requiresStorageNotLow(): Boolean
Return
Boolean: If the constraints require storage not low status.

setRequiredNetworkType

fun setRequiredNetworkType(requiredNetworkType: NetworkType): Unit

setRequiresBatteryNotLow

fun setRequiresBatteryNotLow(requiresBatteryNotLow: Boolean): Unit

getRequiredNetworkType

fun getRequiredNetworkType(): NetworkType

setContentUriTriggers

fun setContentUriTriggers(mContentUriTriggers: ContentUriTriggers!): Unit

setRequiresCharging

fun setRequiresCharging(requiresCharging: Boolean): Unit

requiresBatteryNotLow

fun requiresBatteryNotLow(): Boolean
Return
Boolean: If the constraints require battery not low status.

setRequiresDeviceIdle

fun setRequiresDeviceIdle(requiresDeviceIdle: Boolean): Unit

setRequiresStorageNotLow

fun setRequiresStorageNotLow(requiresStorageNotLow: Boolean): Unit

hasContentUriTriggers

fun hasContentUriTriggers(): Boolean
Return
Boolean: true if ContentUriTriggers is not empty

getContentUriTriggers

fun getContentUriTriggers(): ContentUriTriggers!

requiresCharging

fun requiresCharging(): Boolean
Return
Boolean: If the constraints require charging.

Properties

NONE

static val NONE: Constraints!