UriMediaDescriptor

fun UriMediaDescriptor(context: Context, uriString: String, customData: List<Any> = emptyList()): UriMediaDescriptor

Creates a media descriptor from an String.

Use this function when you have a content uri and a context to infer container type.

Parameters

context

the context to infer container type from content uri

uriString

the uri to create the media descriptor from

customData

custom data to attach to the media descriptor


fun UriMediaDescriptor(uriString: String, customData: List<Any> = emptyList()): UriMediaDescriptor

Creates a media descriptor from a String.

Use this function if your uriString is not a content uri.

Parameters

uriString

the uri to create the media descriptor from

customData

custom data to attach to the media descriptor


fun UriMediaDescriptor(context: Context, uri: Uri, customData: List<Any> = emptyList()): UriMediaDescriptor

Creates a media descriptor from an Uri.

Use this function when you have a content uri and a context to infer container type.

Parameters

context

the context to infer container type from content uri

uri

the uri to create the media descriptor from

customData

custom data to attach to the media descriptor


fun UriMediaDescriptor(uri: Uri, customData: List<Any> = emptyList()): UriMediaDescriptor

Creates a media descriptor from an Uri

Use this function if your uri is not a content uri.

Parameters

uri

the uri to create the media descriptor from

customData

custom data to attach to the media descriptor