# Constraints.ContentUriTrigger

# Constraints.ContentUriTrigger

Artifact:[androidx.work:work-runtime](https://developer.android.com/jetpack/androidx/releases/work)  
[View Source](https://cs.android.com/search?q=file:androidx/work/Constraints.kt+class:androidx.work.Constraints.ContentUriTrigger)  
Added in[2.8.0](https://developer.android.com/jetpack/androidx/releases/work#2.8.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/work/Constraints.ContentUriTrigger "View this page in Java")

<br />

```
class Constraints.ContentUriTrigger
```

<br />

*** ** * ** ***

This class describes a content uri trigger on the[WorkRequest](https://developer.android.com/reference/kotlin/androidx/work/WorkRequest): it should run when a local`content:`[Uri](https://developer.android.com/reference/android/net/Uri.html)is updated. This functionality is identical to the one found in`JobScheduler`and is described in`JobInfo.Builder#addTriggerContentUri(android.app.job.JobInfo.TriggerContentUri)`.

## Summary

|                                                                                                                                                                      ### Public constructors                                                                                                                                                                      |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ContentUriTrigger](https://developer.android.com/reference/kotlin/androidx/work/Constraints.ContentUriTrigger#ContentUriTrigger(android.net.Uri,kotlin.Boolean))`(uri: `[Uri](https://developer.android.com/reference/android/net/Uri.html)`, isTriggeredForDescendants: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` |

|                                        ### Public functions                                         |
|-----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `open operator `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/kotlin/androidx/work/Constraints.ContentUriTrigger#equals(kotlin.Any))`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)` |
| `open `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                  | [hashCode](https://developer.android.com/reference/kotlin/androidx/work/Constraints.ContentUriTrigger#hashCode())`()`                                                                                            |

|                                ### Public properties                                |
|-------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [isTriggeredForDescendants](https://developer.android.com/reference/kotlin/androidx/work/Constraints.ContentUriTrigger#isTriggeredForDescendants()) `true`if trigger also applies to descendants of the[Uri](https://developer.android.com/reference/android/net/Uri.html) |
| [Uri](https://developer.android.com/reference/android/net/Uri.html)                 | [uri](https://developer.android.com/reference/kotlin/androidx/work/Constraints.ContentUriTrigger#uri()) The local`content:`Uri to observe                                                                                                                                  |

## Public constructors

### ContentUriTrigger

Added in[2.8.0](https://developer.android.com/jetpack/androidx/releases/work#2.8.0)  

```
ContentUriTrigger(uri: Uri, isTriggeredForDescendants: Boolean)
```  

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```  

### hashCode

```
open fun hashCode(): Int
```  

## Public properties

### isTriggeredForDescendants

Added in[2.8.0](https://developer.android.com/jetpack/androidx/releases/work#2.8.0)  

```
val isTriggeredForDescendants: Boolean
```

`true`if trigger also applies to descendants of the[Uri](https://developer.android.com/reference/android/net/Uri.html)  

### uri

Added in[2.8.0](https://developer.android.com/jetpack/androidx/releases/work#2.8.0)  

```
val uri: Uri
```

The local`content:`Uri to observe