my code work fine but the default notification sound is wrong (call ringtone)
B4X:
Sub Process_Globals
Dim RM As RingtoneManager
End Sub
Sub btnoti_Click
Dim uri As String
uri = RM.GetDefault(RM.TYPE_NOTIFICATION)
RM.ShowRingtonePicker("RM",RM.TYPE_NOTIFICATION,False,uri)
End Sub
First voice of select list of ShowRingtonePicker is "default ringer" and not "default notification sound"
uri of "default ringer" is "content://settings/system/ringtone" and not "content://settings/system/notification_sound"
Hi Erel
thank's for the answer, but I use it to choose a notification sound for a widget.
The picker works fine but the first element is a ringtone, while others are notification sounds.
Do you think I can not use it to choose a notification?