Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RingtonePreference Default value

Tags:

android

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

like image 321
DJafari Avatar asked Nov 29 '11 15:11

DJafari


1 Answers

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

android:defaultValue="content://settings/system/notification_sound"
like image 199
DJafari Avatar answered Oct 06 '22 01:10

DJafari