我有以下 xml:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="Ringtone preference" android:key="ringtone_option_preference">
<RingtonePreference
android:key="ring_tone_pref"
android:title="Set Ringtone Preference"
android:showSilent="true"
android:ringtoneType="notification"
android:summary="Set Ringtone"/>
</PreferenceScreen>
我希望每次通知即将显示时,查看铃声的值并相应地发出哔哔声:)...更准确地说,我的通知是在广播接收器类中生成的,并且每次接收器捕捉到它创建的东西时新通知...我只想根据首选项中设置的铃声更改通知的铃声。
我怎样才能做到这一点?
谢谢
麦克风