Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

UriMediaItem

public class UriMediaItem
extends MediaItem

java.lang.Object
   ↳ androidx.media2.common.MediaItem
     ↳ androidx.media2.common.UriMediaItem


Structure for media item descriptor for Uri.

Users should use UriMediaItem.Builder to create UriMediaItem.

You cannot directly send this object across the process through ParcelUtils. See MediaItem for detail.

See also:

Summary

Nested classes

class UriMediaItem.Builder

This Builder class simplifies the creation of a UriMediaItem object. 

Inherited constants

Public methods

Uri getUri()

Return the Uri of this media item.

List<HttpCookie> getUriCookies()

Return the Uri cookies of this media item.

Map<String, String> getUriHeaders()

Return the Uri headers of this media item.

Inherited methods

Public methods

getUri

public Uri getUri ()

Return the Uri of this media item.

Returns
Uri the Uri of this media item

getUriCookies

public List<HttpCookie> getUriCookies ()

Return the Uri cookies of this media item.

Returns
List<HttpCookie> the Uri cookies of this media item

getUriHeaders

public Map<String, String> getUriHeaders ()

Return the Uri headers of this media item.

Returns
Map<String, String> the Uri headers of this media item