Reputation: 10346
I have a ringtone preference in a preferences.xml that currently defaults to the system notification sound.
I'd like to default it to silent, but am having trouble finding the content URI to the silent sound.
<RingtonePreference
android:defaultValue="content://settings/system/notification_sound"
android:key="@string/pref_alarm_tone_scan_notification_sound"
android:ringtoneType="notification"
android:showDefault="true"
android:showSilent="true"
android:title="@string/pref_alarm_notification_sound_title" />
In a subclass of Application, I am setting the default values from the xml file as follows:
// apply defaults as stored in preferences.xml
PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
Upvotes: 0
Views: 1252