Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/app/slice/Slice#nestedclasses) \| [Constants](https://developer.android.com/reference/android/app/slice/Slice#constants) \| [Inherited Constants](https://developer.android.com/reference/android/app/slice/Slice#inhconstants) \| [Fields](https://developer.android.com/reference/android/app/slice/Slice#lfields) \| [Protected Ctors](https://developer.android.com/reference/android/app/slice/Slice#proctors) \| [Methods](https://developer.android.com/reference/android/app/slice/Slice#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/app/slice/Slice#inhmethods)

# Slice

*** ** * ** ***


`
public

final

class
Slice
`


`

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


`

`


implements

https://developer.android.com/reference/android/os/Parcelable


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.app.slice.Slice |

<br />

*** ** * ** ***


**This class was deprecated
in API level 35.**   

Slice framework has been deprecated, it will not receive any updates from
`https://developer.android.com/` and forward. If you are looking for a
framework that sends displayable data from one app to another, consider using
`https://developer.android.com/reference/android/app/appsearch/AppSearchManager`.

A slice is a piece of app content and actions that can be surfaced outside of the app.

They are constructed using `https://developer.android.com/reference/android/app/slice/Slice.Builder` in a tree structure
that provides the OS some information about how the content should be displayed.

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/app/slice/Slice.Builder` *This class was deprecated in API level 35. Slice framework has been deprecated, it will not receive any updates from `https://developer.android.com/` and forward. If you are looking for a framework that sends displayable data from one app to another, consider using `https://developer.android.com/reference/android/app/appsearch/AppSearchManager`.* |

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#EXTRA_RANGE_VALUE` Key to retrieve an extra added to an intent when the value of an input range is changed. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#EXTRA_TOGGLE_STATE` Key to retrieve an extra added to an intent when a control is changed. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#HINT_ACTIONS` Hint that this slice contains a number of actions that can be grouped together in a sort of controls area of the UI. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#HINT_ERROR` A hint to indicate that this slice represents an error. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#HINT_HORIZONTAL` Hint that list items within this slice or subslice would appear better if organized horizontally. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#HINT_KEYWORDS` A hint to indicate that the contents of this subslice represent a list of keywords related to the parent slice. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#HINT_LARGE` Hint that this content is important and should be larger when displayed if possible. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#HINT_LAST_UPDATED` Hint indicating an item representing when the content was created or last updated. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#HINT_LIST` Hint that all sub-items/sub-slices within this content should be considered to have `https://developer.android.com/reference/android/app/slice/Slice#HINT_LIST_ITEM`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#HINT_LIST_ITEM` Hint that this item is part of a list and should be formatted as if is part of a list. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#HINT_NO_TINT` Hint to indicate that this content should not be tinted. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#HINT_PARTIAL` Hint to indicate that this slice is incomplete and an update will be sent once loading is complete. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#HINT_PERMISSION_REQUEST` A hint to indicate that this slice represents a permission request for showing slices. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#HINT_SEE_MORE` A hint representing that this item should be used to indicate that there's more content associated with this slice. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#HINT_SELECTED` Hint indicating that this item (and its sub-items) are the current selection. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#HINT_SHORTCUT` Hint to indicate that this content should only be displayed if the slice is presented as a shortcut. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#HINT_SUMMARY` Hint indicating this content should be shown instead of the normal content when the slice is in small format. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#HINT_TITLE` Hint that this content is a title of other content in the slice. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#HINT_TTL` Hint indicating an item representing a time-to-live for the content. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#SUBTYPE_COLOR` Subtype to tag an item as representing a color. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#SUBTYPE_CONTENT_DESCRIPTION` Subtype to tag an item to use as a content description. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#SUBTYPE_LAYOUT_DIRECTION` Subtype to indicate that this item indicates the layout direction for content in the slice. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#SUBTYPE_MAX` Subtype to tag an item as representing the max int value for a `https://developer.android.com/reference/android/app/slice/Slice#SUBTYPE_RANGE`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#SUBTYPE_MESSAGE` Subtype to indicate that this is a message as part of a communication sequence in this slice. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#SUBTYPE_MILLIS` Subtype to tag an item as representing a time in milliseconds since midnight, January 1, 1970 UTC. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#SUBTYPE_PRIORITY` Subtype to tag an item representing priority. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#SUBTYPE_RANGE` Subtype to tag an item as representing a range. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#SUBTYPE_SOURCE` Subtype to tag the source (i.e. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#SUBTYPE_TOGGLE` Subtype to indicate that this content has a toggle action associated with it. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/slice/Slice#SUBTYPE_VALUE` Subtype to tag an item as representing the current int value for a `https://developer.android.com/reference/android/app/slice/Slice#SUBTYPE_RANGE`. |

### Inherited constants

From interface `https://developer.android.com/reference/android/os/Parcelable` `int` `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR`

Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that
the Parcelable object's flattened representation includes a file descriptor.


`int` `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`

Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written
is a return value, that is the result of a function such as
"`Parcelable someFunction()`",
"`void someFunction(out Parcelable)`", or
"`void someFunction(inout Parcelable)`".


| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/app/slice/Slice>` | `https://developer.android.com/reference/android/app/slice/Slice#CREATOR` |

| ### Protected constructors ||
|---|---|
| ` https://developer.android.com/reference/android/app/slice/Slice#Slice(android.os.Parcel)(https://developer.android.com/reference/android/os/Parcel in) ` |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/app/slice/Slice#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/java/lang/String>` | ` https://developer.android.com/reference/android/app/slice/Slice#getHints()() ` |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/app/slice/SliceItem>` | ` https://developer.android.com/reference/android/app/slice/Slice#getItems()() ` |
| ` https://developer.android.com/reference/android/app/slice/SliceSpec` | ` https://developer.android.com/reference/android/app/slice/Slice#getSpec()() ` |
| ` https://developer.android.com/reference/android/net/Uri` | ` https://developer.android.com/reference/android/app/slice/Slice#getUri()() ` |
| ` boolean` | ` https://developer.android.com/reference/android/app/slice/Slice#isCallerNeeded()() ` Returns whether the caller for this slice matters. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/slice/Slice#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/app/slice/Slice#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Flatten this object in to a Parcel. |

### 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*.


From interface `

https://developer.android.com/reference/android/os/Parcelable

` `
abstract


int` `
https://developer.android.com/reference/android/os/Parcelable#describeContents()()
`

Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.


`
abstract


void` `
https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags)
`

Flatten this object in to a Parcel.


## Constants

### EXTRA_RANGE_VALUE

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

```
public static final String EXTRA_RANGE_VALUE
```

Key to retrieve an extra added to an intent when the value of an input range is changed.

<br />

Constant Value:

"android.app.slice.extra.RANGE_VALUE"


### EXTRA_TOGGLE_STATE

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

```
public static final String EXTRA_TOGGLE_STATE
```

Key to retrieve an extra added to an intent when a control is changed.

<br />

Constant Value:

"android.app.slice.extra.TOGGLE_STATE"


### HINT_ACTIONS

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

```
public static final String HINT_ACTIONS
```

Hint that this slice contains a number of actions that can be grouped together
in a sort of controls area of the UI.

<br />

Constant Value:

"actions"


### HINT_ERROR

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

```
public static final String HINT_ERROR
```

A hint to indicate that this slice represents an error.

<br />

Constant Value:

"error"


### HINT_HORIZONTAL

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

```
public static final String HINT_HORIZONTAL
```

Hint that list items within this slice or subslice would appear better
if organized horizontally.

<br />

Constant Value:

"horizontal"


### HINT_KEYWORDS

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

```
public static final String HINT_KEYWORDS
```

A hint to indicate that the contents of this subslice represent a list of keywords
related to the parent slice.
Expected to be on an item of format `https://developer.android.com/reference/android/app/slice/SliceItem#FORMAT_SLICE`.

<br />

Constant Value:

"keywords"


### HINT_LARGE

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

```
public static final String HINT_LARGE
```

Hint that this content is important and should be larger when displayed if
possible.

<br />

Constant Value:

"large"


### HINT_LAST_UPDATED

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

```
public static final String HINT_LAST_UPDATED
```

Hint indicating an item representing when the content was created or last updated.

<br />

Constant Value:

"last_updated"


### HINT_LIST

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

```
public static final String HINT_LIST
```

Hint that all sub-items/sub-slices within this content should be considered
to have `https://developer.android.com/reference/android/app/slice/Slice#HINT_LIST_ITEM`.

<br />

Constant Value:

"list"


### HINT_LIST_ITEM

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

```
public static final String HINT_LIST_ITEM
```

Hint that this item is part of a list and should be formatted as if is part
of a list.

<br />

Constant Value:

"list_item"


### HINT_NO_TINT

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

```
public static final String HINT_NO_TINT
```

Hint to indicate that this content should not be tinted.

<br />

Constant Value:

"no_tint"


### HINT_PARTIAL

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

```
public static final String HINT_PARTIAL
```

Hint to indicate that this slice is incomplete and an update will be sent once
loading is complete. Slices which contain HINT_PARTIAL will not be cached by the
OS and should not be cached by apps.

<br />

Constant Value:

"partial"


### HINT_PERMISSION_REQUEST

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

```
public static final String HINT_PERMISSION_REQUEST
```

A hint to indicate that this slice represents a permission request for showing
slices.

<br />

Constant Value:

"permission_request"


### HINT_SEE_MORE

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

```
public static final String HINT_SEE_MORE
```

A hint representing that this item should be used to indicate that there's more
content associated with this slice.

<br />

Constant Value:

"see_more"


### HINT_SELECTED

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

```
public static final String HINT_SELECTED
```

Hint indicating that this item (and its sub-items) are the current selection.

<br />

Constant Value:

"selected"


### HINT_SHORTCUT

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

```
public static final String HINT_SHORTCUT
```

Hint to indicate that this content should only be displayed if the slice is presented
as a shortcut.

<br />

Constant Value:

"shortcut"


### HINT_SUMMARY

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

```
public static final String HINT_SUMMARY
```

Hint indicating this content should be shown instead of the normal content when the slice
is in small format.

<br />

Constant Value:

"summary"


### HINT_TITLE

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

```
public static final String HINT_TITLE
```

Hint that this content is a title of other content in the slice. This can also indicate that
the content should be used in the shortcut representation of the slice (icon, label, action),
normally this should be indicated by adding the hint on the action containing that content.

<br />

**See also:**

- `https://developer.android.com/reference/android/app/slice/SliceItem#FORMAT_ACTION`

Constant Value:

"title"


### HINT_TTL

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

```
public static final String HINT_TTL
```

Hint indicating an item representing a time-to-live for the content.

<br />

Constant Value:

"ttl"


### SUBTYPE_COLOR

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

```
public static final String SUBTYPE_COLOR
```

Subtype to tag an item as representing a color.
Expected to be on an item of format `https://developer.android.com/reference/android/app/slice/SliceItem#FORMAT_INT`.

<br />

Constant Value:

"color"


### SUBTYPE_CONTENT_DESCRIPTION

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

```
public static final String SUBTYPE_CONTENT_DESCRIPTION
```

Subtype to tag an item to use as a content description.
Expected to be on an item of format `https://developer.android.com/reference/android/app/slice/SliceItem#FORMAT_TEXT`.

<br />

Constant Value:

"content_description"


### SUBTYPE_LAYOUT_DIRECTION

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

```
public static final String SUBTYPE_LAYOUT_DIRECTION
```

Subtype to indicate that this item indicates the layout direction for content
in the slice.
Expected to be an item of format `https://developer.android.com/reference/android/app/slice/SliceItem#FORMAT_INT`.

<br />

Constant Value:

"layout_direction"


### SUBTYPE_MAX

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

```
public static final String SUBTYPE_MAX
```

Subtype to tag an item as representing the max int value for a `https://developer.android.com/reference/android/app/slice/Slice#SUBTYPE_RANGE`.
Expected to be on an item of format `https://developer.android.com/reference/android/app/slice/SliceItem#FORMAT_INT`.

<br />

Constant Value:

"max"


### SUBTYPE_MESSAGE

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

```
public static final String SUBTYPE_MESSAGE
```

Subtype to indicate that this is a message as part of a communication
sequence in this slice.
Expected to be on an item of format `https://developer.android.com/reference/android/app/slice/SliceItem#FORMAT_SLICE`.

<br />

Constant Value:

"message"


### SUBTYPE_MILLIS

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

```
public static final String SUBTYPE_MILLIS
```

Subtype to tag an item as representing a time in milliseconds since midnight,
January 1, 1970 UTC.

<br />

Constant Value:

"millis"


### SUBTYPE_PRIORITY

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

```
public static final String SUBTYPE_PRIORITY
```

Subtype to tag an item representing priority.
Expected to be on an item of format `https://developer.android.com/reference/android/app/slice/SliceItem#FORMAT_INT`.

<br />

Constant Value:

"priority"


### SUBTYPE_RANGE

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

```
public static final String SUBTYPE_RANGE
```

Subtype to tag an item as representing a range.
Expected to be on an item of format `https://developer.android.com/reference/android/app/slice/SliceItem#FORMAT_SLICE` containing
a `https://developer.android.com/reference/android/app/slice/Slice#SUBTYPE_VALUE` and possibly a `https://developer.android.com/reference/android/app/slice/Slice#SUBTYPE_MAX`.

<br />

Constant Value:

"range"


### SUBTYPE_SOURCE

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

```
public static final String SUBTYPE_SOURCE
```

Subtype to tag the source (i.e. sender) of a `https://developer.android.com/reference/android/app/slice/Slice#SUBTYPE_MESSAGE`.
Expected to be on an item of format `https://developer.android.com/reference/android/app/slice/SliceItem#FORMAT_TEXT`,
`https://developer.android.com/reference/android/app/slice/SliceItem#FORMAT_IMAGE` or an `https://developer.android.com/reference/android/app/slice/SliceItem#FORMAT_SLICE` containing them.

<br />

Constant Value:

"source"


### SUBTYPE_TOGGLE

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

```
public static final String SUBTYPE_TOGGLE
```

Subtype to indicate that this content has a toggle action associated with it. To indicate
that the toggle is on, use `https://developer.android.com/reference/android/app/slice/Slice#HINT_SELECTED`. When the toggle state changes, the
intent associated with it will be sent along with an extra `https://developer.android.com/reference/android/app/slice/Slice#EXTRA_TOGGLE_STATE`
which can be retrieved to see the new state of the toggle.

<br />

Constant Value:

"toggle"


### SUBTYPE_VALUE

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

```
public static final String SUBTYPE_VALUE
```

Subtype to tag an item as representing the current int value for a `https://developer.android.com/reference/android/app/slice/Slice#SUBTYPE_RANGE`.
Expected to be on an item of format `https://developer.android.com/reference/android/app/slice/SliceItem#FORMAT_INT`.

<br />

Constant Value:

"value"


## Fields

### CREATOR

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

```
public static final Creator<Slice> CREATOR
```

<br />

<br />

## Protected constructors

### Slice

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

```
protected Slice (Parcel in)
```

<br />

<br />

| Parameters ||
|---|---|
| `in` | `Parcel` <br /> |

## Public methods

### describeContents

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

```
public int describeContents ()
```

Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`,
the return value of this method must include the
`https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` bit.

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

### getHints

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

```
public List<String> getHints ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/java/lang/String>` | All hints associated with this Slice. Value is one of the following: - `https://developer.android.com/reference/android/app/slice/Slice#HINT_TITLE` - `https://developer.android.com/reference/android/app/slice/Slice#HINT_LIST` - `https://developer.android.com/reference/android/app/slice/Slice#HINT_LIST_ITEM` - `https://developer.android.com/reference/android/app/slice/Slice#HINT_LARGE` - `https://developer.android.com/reference/android/app/slice/Slice#HINT_ACTIONS` - `https://developer.android.com/reference/android/app/slice/Slice#HINT_SELECTED` - `https://developer.android.com/reference/android/app/slice/Slice#HINT_NO_TINT` - `https://developer.android.com/reference/android/app/slice/Slice#HINT_SHORTCUT` - `https://developer.android.com/reference/android/app/slice/Slice#HINT_HORIZONTAL` - `https://developer.android.com/reference/android/app/slice/Slice#HINT_PARTIAL` - `https://developer.android.com/reference/android/app/slice/Slice#HINT_SEE_MORE` - `https://developer.android.com/reference/android/app/slice/Slice#HINT_KEYWORDS` - `https://developer.android.com/reference/android/app/slice/Slice#HINT_ERROR` - `https://developer.android.com/reference/android/app/slice/Slice#HINT_TTL` - `https://developer.android.com/reference/android/app/slice/Slice#HINT_LAST_UPDATED` - `https://developer.android.com/reference/android/app/slice/Slice#HINT_PERMISSION_REQUEST` |

### getItems

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

```
public List<SliceItem> getItems ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/app/slice/SliceItem>` | All child `https://developer.android.com/reference/android/app/slice/SliceItem`s that this Slice contains. <br /> |

### getSpec

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

```
public SliceSpec getSpec ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/slice/SliceSpec` | The spec for this slice. This value may be `null`. <br /> |

### getUri

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

```
public Uri getUri ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/Uri` | The Uri that this Slice represents. <br /> |

### isCallerNeeded

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

```
public boolean isCallerNeeded ()
```

Returns whether the caller for this slice matters.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/app/slice/Slice.Builder#setCallerNeeded(boolean)`

### toString

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

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | A string representation of this slice. <br /> |

### writeToParcel

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

```
public void writeToParcel (Parcel dest, 
                int flags)
```

Flatten this object in to a Parcel.

<br />

| Parameters ||
|---|---|
| `dest` | `Parcel`: The Parcel in which the object should be written. This value cannot be `null`. <br /> |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` |