Android.Media.MediaPlayer.SetDataSource Method
Sets the data source as a content Uri.

Syntax

[Android.Runtime.Register("setDataSource", "(Landroid/content/Context;Landroid/net/Uri;)V", "GetSetDataSource_Landroid_content_Context_Landroid_net_Uri_Handler")]
public virtual void SetDataSource (Android.Content.Context context, Android.Net.Uri uri)

Parameters

context
the Context to use when resolving the Uri
uri
the Content URI of the data you want to play

Exceptions

TypeReason
Java.Lang.IllegalStateExceptionif it is called in an invalid state
Java.IO.IOException
Java.Lang.IllegalArgumentException
Java.Lang.SecurityException

Remarks

Sets the data source as a content Uri.

[Android Documentation]

Requirements

Namespace: Android.Media
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1