DJafari
DJafari

Reputation: 13535

RingtonePreference Default value

I have this code for my Preference screen,

<RingtonePreference 
    android:key="notification_sound" 
    android:ringtoneType="notification" 
    android:title="Notification Sound" 
    android:showDefault="true" 
    android:showSilent="true" />

i want set default value for RingtonePreference to Default Notification Sound in xml, how can do it ?

Thanks

Upvotes: 9

Views: 5695

Answers (1)

DJafari
DJafari

Reputation: 13535

i found solution, thanks to Joe, defaultValue Must be :

android:defaultValue="content://settings/system/notification_sound"

Upvotes: 31

Related Questions