Compartilhar via


RingtoneManager.GetRingtone Method

Definition

Overloads

GetRingtone(Context, Uri)

Returns a Ringtone for a given sound URI.

GetRingtone(Int32)

Gets a Ringtone for the ringtone at the given position in the Cursor.

GetRingtone(Context, Uri)

Returns a Ringtone for a given sound URI.

[Android.Runtime.Register("getRingtone", "(Landroid/content/Context;Landroid/net/Uri;)Landroid/media/Ringtone;", "")]
public static Android.Media.Ringtone? GetRingtone (Android.Content.Context? context, Android.Net.Uri? ringtoneUri);
[<Android.Runtime.Register("getRingtone", "(Landroid/content/Context;Landroid/net/Uri;)Landroid/media/Ringtone;", "")>]
static member GetRingtone : Android.Content.Context * Android.Net.Uri -> Android.Media.Ringtone

Parameters

context
Context

A context used to query.

ringtoneUri
Uri

The Uri of a sound or ringtone.

Returns

A Ringtone for the given URI, or null.

Attributes

Remarks

Returns a Ringtone for a given sound URI.

If the given URI cannot be opened for any reason, this method will attempt to fallback on another sound. If it cannot find any, it will return null.

Java documentation for android.media.RingtoneManager.getRingtone(android.content.Context, android.net.Uri).

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

GetRingtone(Int32)

Gets a Ringtone for the ringtone at the given position in the Cursor.

[Android.Runtime.Register("getRingtone", "(I)Landroid/media/Ringtone;", "GetGetRingtone_IHandler")]
public virtual Android.Media.Ringtone? GetRingtone (int position);
[<Android.Runtime.Register("getRingtone", "(I)Landroid/media/Ringtone;", "GetGetRingtone_IHandler")>]
abstract member GetRingtone : int -> Android.Media.Ringtone
override this.GetRingtone : int -> Android.Media.Ringtone

Parameters

position
Int32

The position (in the Cursor) of the ringtone.

Returns

A Ringtone pointing to the ringtone.

Attributes

Remarks

Gets a Ringtone for the ringtone at the given position in the Cursor.

Java documentation for android.media.RingtoneManager.getRingtone(int).

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