RingtoneOptions

data class RingtoneOptions(val ringtoneType: Int, val showDefault: Boolean = true, val allowSilent: Boolean = false, val title: String? = null, val defaultUri: Uri? = null, val existingUri: Uri? = null)

Ringtone options

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.

See also

Constructors

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

Properties

Link copied to clipboard
val allowSilent: Boolean = false
Link copied to clipboard
val defaultUri: Uri? = null
Link copied to clipboard
val existingUri: Uri? = null
Link copied to clipboard
Link copied to clipboard
val showDefault: Boolean = true
Link copied to clipboard
val title: String? = null