Freigeben über


RingtoneManager.GetValidRingtoneUri(Context) Method

Definition

Returns a valid ringtone URI.

[Android.Runtime.Register("getValidRingtoneUri", "(Landroid/content/Context;)Landroid/net/Uri;", "")]
public static Android.Net.Uri? GetValidRingtoneUri (Android.Content.Context? context);
[<Android.Runtime.Register("getValidRingtoneUri", "(Landroid/content/Context;)Landroid/net/Uri;", "")>]
static member GetValidRingtoneUri : Android.Content.Context -> Android.Net.Uri

Parameters

context
Context

The context to use for querying.

Returns

Uri

A ringtone URI, or null if one cannot be found.

Attributes

Remarks

Returns a valid ringtone URI. No guarantees on which it returns. If it cannot find one, returns null. If it can only find one on external storage and the caller doesn't have the android.Manifest.permission#READ_EXTERNAL_STORAGE permission, returns null.

Java documentation for android.media.RingtoneManager.getValidRingtoneUri(android.content.Context).

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