# 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)

*** ** * ** ***


```
public final class Constraints.ContentUriTrigger
```

<br />

*** ** * ** ***

This class describes a content uri trigger on the `https://developer.android.com/reference/androidx/work/WorkRequest`: it should run when a local `content:` `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 |
|---|
| `https://developer.android.com/reference/androidx/work/Constraints.ContentUriTrigger#ContentUriTrigger(android.net.Uri,kotlin.Boolean)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri, boolean isTriggeredForDescendants)` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/work/Constraints.ContentUriTrigger#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/work/Constraints.ContentUriTrigger#getUri()()` The local `content:` Uri to observe |
| `int` | `https://developer.android.com/reference/androidx/work/Constraints.ContentUriTrigger#hashCode()()` |
| `final boolean` | `https://developer.android.com/reference/androidx/work/Constraints.ContentUriTrigger#isTriggeredForDescendants()()` `true` if trigger also applies to descendants of the `https://developer.android.com/reference/android/net/Uri.html` |

## Public constructors

### ContentUriTrigger

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

```
public ContentUriTrigger(@NonNull Uri uri, boolean isTriggeredForDescendants)
```

## Public methods

### equals

```
public boolean equals(Object other)
```

### getUri

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

```
public final @NonNull Uri getUri()
```

The local `content:` Uri to observe

### hashCode

```
public int hashCode()
```

### isTriggeredForDescendants

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

```
public final boolean isTriggeredForDescendants()
```

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