Bug? ShowRingtonePicker default notification sound ?

iz0ndg

Active Member
Licensed User
Longtime User
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"

I done something wrong?
 

iz0ndg

Active Member
Licensed User
Longtime User
Yes. You should use RM.TYPE_RINGTONE instead of NOTIFICATION.

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?

Happy Holidays !
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is what I get when I run your code:

upload_2013-12-29_10-1-15.png
 

iz0ndg

Active Member
Licensed User
Longtime User
This is what I get when I run my code on THL W200 stock firmware:

Screenshot_2013-12-29-09-12-51.png


It is probably a matter of Android version or firmware,
Thank you anyway.
 
Top