Share via


SliceManager.SliceMetadataKey Field

Definition

The meta-data key that allows an activity to easily be linked directly to a slice.

[Android.Runtime.Register("SLICE_METADATA_KEY", ApiSince=28)]
public const string SliceMetadataKey;
[<Android.Runtime.Register("SLICE_METADATA_KEY", ApiSince=28)>]
val mutable SliceMetadataKey : string

Field Value

Attributes

Remarks

The meta-data key that allows an activity to easily be linked directly to a slice.

An activity can be statically linked to a slice uri by including a meta-data item for this key that contains a valid slice uri for the same application declaring the activity.

{@literal
<activity android:name="com.example.mypkg.MyActivity">
<meta-data android:name="android.metadata.SLICE_URI"
                           android:value="content://com.example.mypkg/main_slice" />
</activity>}

Java documentation for android.app.slice.SliceManager.SLICE_METADATA_KEY.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to