Added in API level 28

SettingsSlicesContract


open class SettingsSlicesContract
kotlin.Any
   ↳ android.provider.SettingsSlicesContract

Provides a contract for platform-supported Settings Slices.

Contains definitions for the supported SliceProvider authority, authority Uri, and key constants.

Slice presenters interested in learning meta-data about the Slice should read the Slice object at runtime.

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();
  

Summary

Constants
static String

Authority for platform Settings Slices.

static String

Uri key for the Airplane Mode setting.

static String

Uri key for the Battery Saver setting.

static String

Uri key for the Bluetooth setting.

static String

Uri key for the Location setting.

static String

Uri key for the Wi-fi setting.

static String

Uri path indicating that the requested Slice should have inline controls for the corresponding setting.

static String

Uri path indicating that the requested Slice should be Intent-only.

Properties
static Uri!

A content:// style uri to the Settings Slices authority, AUTHORITY.

Constants

AUTHORITY

Added in API level 28
static val AUTHORITY: String

Authority for platform Settings Slices.

Value: "android.settings.slices"

KEY_AIRPLANE_MODE

Added in API level 28
static val KEY_AIRPLANE_MODE: String

Uri key for the Airplane Mode setting.

Value: "airplane_mode"

KEY_BATTERY_SAVER

Added in API level 28
static val KEY_BATTERY_SAVER: String

Uri key for the Battery Saver setting.

Value: "battery_saver"

KEY_BLUETOOTH

Added in API level 28
static val KEY_BLUETOOTH: String

Uri key for the Bluetooth setting.

Value: "bluetooth"

KEY_LOCATION

Added in API level 28
static val KEY_LOCATION: String

Uri key for the Location setting.

Value: "location"

KEY_WIFI

Added in API level 28
static val KEY_WIFI: String

Uri key for the Wi-fi setting.

Value: "wifi"

PATH_SETTING_ACTION

Added in API level 28
static val PATH_SETTING_ACTION: String

Uri path indicating that the requested Slice should have inline controls for the corresponding setting.

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

Value: "action"

PATH_SETTING_INTENT

Added in API level 28
static val PATH_SETTING_INTENT: String

Uri path indicating that the requested Slice should be Intent-only.

Slices with actions should use the PATH_SETTING_ACTION path.

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

Value: "intent"

Properties

BASE_URI

Added in API level 28
static val BASE_URI: Uri!

A content:// style uri to the Settings Slices authority, AUTHORITY.