RingtoneOptions

constructor(ringtoneType: Int, showDefault: Boolean = true, allowSilent: Boolean = false, title: String? = null, defaultUri: Uri? = null, existingUri: Uri? = null)

Parameters

ringtoneType

one of TYPE_RINGTONE, TYPE_NOTIFICATION, TYPE_ALARM, or TYPE_ALL (bitwise or'd together)

title

The title of the ringtone picker. Default value is suitable for most cases

defaultUri

The uri to the sound to play when the user previews "default" sound. This can be one of System#DEFAULT_RINGTONE_URI, System#DEFAULT_NOTIFICATION_URI, or System#DEFAULT_ALARM_ALERT_URI to have the "Default" point to the current sound for the given default sound type. If you are showing a ringtone picker for some other type of sound, you are free to provide any Uri here.

existingUri

Given to the ringtone picker as a Uri. The Uri of the current ringtone, which will be used to show a checkmark next to the item for this Uri. If showing an item for "Default" (@see EXTRA_RINGTONE_SHOW_DEFAULT), this can also be one of System#DEFAULT_RINGTONE_URI, System#DEFAULT_NOTIFICATION_URI, or System#DEFAULT_ALARM_ALERT_URI to have the "Default" item checked.

allowSilent

Whether to show the "Silent" item in the list.

showDefault

Whether to show the "Default" item in the list.