アプリに着信音の設定がありますが、希望の着信音を選択しても設定値に保存されません。設定をもう一度クリックしても、選択したものが表示されません。
ここにXMLがあります
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="Audio Settings">
<CheckBoxPreference
android:key="SMS_PREF_TTS"
android:title="Say name of sender"
android:summary="When a person in your contact list sends you a sms/mms message its says their name"
android:defaultValue="false">
</CheckBoxPreference>
<CheckBoxPreference
android:key="SMS_PREF_TTS_MSG"
android:title="Say Message"
android:summary="Will say the message of sender from contact list"
android:dependency="SMS_PREF_TTS"
android:defaultValue="false">
</CheckBoxPreference>
<RingtonePreference
android:key="SMS_PREF_SOUND"
android:title="Change Sound"
android:ringtoneType="notification"
android:summary="Select the notification Sound"
android:dialogTitle="Change Sound"
android:defaultValue="Silent">
</RingtonePreference>
</PreferenceCategory>
</PreferenceScreen>
奇妙なことは、アプリの別の部分に同じように見える着信音の設定で別のxmlを書いたところですが、それが機能するので理解できません。
ここに作業中のものがあります
<RingtonePreference
android:key="CAL_PREF_TONE"
android:title="Default ringtone"
android:summary="Select default notification ringtone"
android:ringtoneType="notification"
android:defaultValue="Silent"
android:dependency="CAL_PREF_ON">
</RingtonePreference>