Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/provider/SettingsSlicesContract#constants) \| [Fields](https://developer.android.com/reference/android/provider/SettingsSlicesContract#lfields) \| [Inherited Methods](https://developer.android.com/reference/android/provider/SettingsSlicesContract#inhmethods)

# SettingsSlicesContract

*** ** * ** ***


`
public


class
SettingsSlicesContract
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.provider.SettingsSlicesContract |

<br />

*** ** * ** ***

Provides a contract for platform-supported Settings `https://developer.android.com/reference/android/app/slice/Slice`.


Contains definitions for the supported `https://developer.android.com/reference/android/app/slice/SliceProvider`
authority, authority `https://developer.android.com/reference/android/net/Uri`, and key constants.


`https://developer.android.com/reference/android/app/slice/Slice` presenters interested in learning meta-data about the
`https://developer.android.com/reference/android/app/slice/Slice` should read the `https://developer.android.com/reference/android/app/slice/Slice`
object at runtime.


`https://developer.android.com/reference/android/net/Uri` builder example:

```
Uri wifiActionUri = BASE_URI
        .buildUpon()
        .appendPath(PATH_SETTING_ACTION)
        .appendPath(KEY_WIFI)
        .build();
Uri bluetoothIntentUri = BASE_URI
        .buildUpon()
        .appendPath(PATH_SETTING_INTENT)
        .appendPath(KEY_BLUETOOTH)
        .build();
```

<br />

## Summary

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/SettingsSlicesContract#AUTHORITY` Authority for platform Settings Slices. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/SettingsSlicesContract#KEY_AIRPLANE_MODE` `https://developer.android.com/reference/android/net/Uri` key for the Airplane Mode setting. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/SettingsSlicesContract#KEY_BATTERY_SAVER` `https://developer.android.com/reference/android/net/Uri` key for the Battery Saver setting. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/SettingsSlicesContract#KEY_BLUETOOTH` `https://developer.android.com/reference/android/net/Uri` key for the Bluetooth setting. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/SettingsSlicesContract#KEY_LOCATION` `https://developer.android.com/reference/android/net/Uri` key for the Location setting. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/SettingsSlicesContract#KEY_WIFI` `https://developer.android.com/reference/android/net/Uri` key for the Wi-fi setting. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/SettingsSlicesContract#PATH_SETTING_ACTION` `https://developer.android.com/reference/android/net/Uri` path indicating that the requested `https://developer.android.com/reference/android/app/slice/Slice` should have inline controls for the corresponding setting. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/SettingsSlicesContract#PATH_SETTING_INTENT` `https://developer.android.com/reference/android/net/Uri` path indicating that the requested `https://developer.android.com/reference/android/app/slice/Slice` should be `https://developer.android.com/reference/android/content/Intent`-only. |

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/net/Uri` | `https://developer.android.com/reference/android/provider/SettingsSlicesContract#BASE_URI` A content:// style uri to the Settings Slices authority, `https://developer.android.com/reference/android/provider/SettingsSlicesContract#AUTHORITY`. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Constants

### AUTHORITY

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String AUTHORITY
```

Authority for platform Settings Slices.

<br />

Constant Value:

"android.settings.slices"


### KEY_AIRPLANE_MODE

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String KEY_AIRPLANE_MODE
```

`https://developer.android.com/reference/android/net/Uri` key for the Airplane Mode setting.

<br />

Constant Value:

"airplane_mode"


### KEY_BATTERY_SAVER

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String KEY_BATTERY_SAVER
```

`https://developer.android.com/reference/android/net/Uri` key for the Battery Saver setting.

<br />

Constant Value:

"battery_saver"


### KEY_BLUETOOTH

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String KEY_BLUETOOTH
```

`https://developer.android.com/reference/android/net/Uri` key for the Bluetooth setting.

<br />

Constant Value:

"bluetooth"


### KEY_LOCATION

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String KEY_LOCATION
```

`https://developer.android.com/reference/android/net/Uri` key for the Location setting.

<br />

Constant Value:

"location"


### KEY_WIFI

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String KEY_WIFI
```

`https://developer.android.com/reference/android/net/Uri` key for the Wi-fi setting.

<br />

Constant Value:

"wifi"


### PATH_SETTING_ACTION

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String PATH_SETTING_ACTION
```

`https://developer.android.com/reference/android/net/Uri` path indicating that the requested `https://developer.android.com/reference/android/app/slice/Slice` should
have inline controls for the corresponding setting.


This path will only contain Slices defined by keys in this class.

<br />

Constant Value:

"action"


### PATH_SETTING_INTENT

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String PATH_SETTING_INTENT
```

`https://developer.android.com/reference/android/net/Uri` path indicating that the requested `https://developer.android.com/reference/android/app/slice/Slice` should
be `https://developer.android.com/reference/android/content/Intent`-only.


`https://developer.android.com/reference/android/app/slice/Slice` with actions should use the `https://developer.android.com/reference/android/provider/SettingsSlicesContract#PATH_SETTING_ACTION` path.


This path will only contain Slices defined by keys in this class

<br />

Constant Value:

"intent"


## Fields

### BASE_URI

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Uri BASE_URI
```

A content:// style uri to the Settings Slices authority, `https://developer.android.com/reference/android/provider/SettingsSlicesContract#AUTHORITY`.

<br />