Hi,
I try to set a resource sound as notification ringtone.
I've added the permission WRITE_SETTINGS in the androidmanifest file, then
in my main class I've hadded the following.
Uri mUri = Uri.parse("android.resource://" + mPackageName + "/raw/" +
mSoundFileName);
RingtoneManager.setActualDefaultRingtoneUri(getApplicationContext(),
RingtoneManager.TYPE_NOTIFICATION, mUri);
mUri is allright and it seems that I can set the default ringtone because
I've made the following test :
get back the default notification ringtone and play it.
RingtoneManager.getRingtone(getApplicationContext(),
RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION)).play();
It is my resource sound. Great.
However, when new notification arrives, no sound plays.
(In the android settings, default notification sound has no sound checked)
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en