Android Guides | Samples

Android.Media.RingtoneManager Class

RingtoneManager provides access to ringtones, notification, and other types of sounds.

See Also: RingtoneManager

Syntax

[Android.Runtime.Register("android/media/RingtoneManager", DoNotGenerateAcw=true)]
public class RingtoneManager : Object

Remarks

RingtoneManager provides access to ringtones, notification, and other types of sounds. It manages querying the different media providers and combines the results into a single cursor. It also provides a Ringtone for each ringtone. We generically call these sounds ringtones, however the RingtoneManager.TYPE_RINGTONE refers to the type of sounds that are suitable for the phone ringer.

To show a ringtone picker to the user, use the RingtoneManager.ActionRingtonePicker intent to launch the picker as a subactivity.

See Also

[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

The members of Android.Media.RingtoneManager are listed below.

See Also: Object

Public Constructors

Constructs a RingtoneManager.
Constructs a RingtoneManager.

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Fields

const
ActionRingtonePickerString. Activity Action: Shows a ringtone picker.
const
ExtraRingtoneDefaultUriString. Given to the ringtone picker as a Uri.
const
ExtraRingtoneExistingUriString. Given to the ringtone picker as a Uri.
const
ExtraRingtoneIncludeDrmString. Given to the ringtone picker as a boolean.
const
ExtraRingtonePickedUriString. Returned from the ringtone picker as a Uri.
const
ExtraRingtoneShowDefaultString. Given to the ringtone picker as a boolean.
const
ExtraRingtoneShowSilentString. Given to the ringtone picker as a boolean.
const
ExtraRingtoneTitleString. Given to the ringtone picker as a ICharSequence.
const
ExtraRingtoneTypeString. Given to the ringtone picker as an int.

Public Properties

[read-only]
CursorICursor. Returns a ICursor of all the ringtones available.
IncludeDrmBoolean. Returns whether DRM ringtones will be included.
StopPreviousRingtoneBoolean.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

static
GetActualDefaultRingtoneUri(Context, RingtoneType) : Uri
Gets the current default sound's Uri.
static
GetDefaultType(Uri) : RingtoneType
Returns the type of a default Uri.
static
GetDefaultUri(RingtoneType) : Uri
Returns the Uri for the default ringtone of a particular type.
GetRingtone(Int32) : Ringtone
Gets a Ringtone for the ringtone at the given position in the ICursor.
static
GetRingtone(Context, Uri) : Ringtone
Returns a Ringtone for a given sound URI.
GetRingtonePosition(Uri) : Int32
Gets the position of a Uri within this RingtoneManager.
GetRingtoneUri(Int32) : Uri
Gets a Uri for the ringtone at the given position in the ICursor.
static
GetValidRingtoneUri(Context) : Uri
Returns a valid ringtone URI.
InferStreamType() : Stream
Infers the playback stream type based on what type of ringtones this manager is returning.
InvokeStopPreviousRingtone()
Stops playing the last Ringtone retrieved from this.
static
IsDefault(Uri) : Boolean
Returns whether the given Uri is one of the default ringtones.
static
SetActualDefaultRingtoneUri(Context, RingtoneType, Uri)
Sets the Uri of the default sound for a given sound type.
SetType(RingtoneType)
Sets which type(s) of ringtones will be listed by this.