i guess the app just get the mp3 from the systemsetting and set this mp3 as notification sound.
You can do the same. I guess you must; i do not know a api to set it from systemsounds.
You need to use contentresolver to get the sounds, let the user select one, get the sound, store it for later use.
Set the sound when creating a notification... That´s what i would do.
I am not sure that is what you want but here is a sample to pick the sound using ringtone manager and assign this sound to the notification
B4X:
Dim nb As NB6
Dim uri As Uri 'ContentResolver library
Dim rm As RingtoneManager
rm.ShowRingtonePicker("rm", rm.TYPE_NOTIFICATION, True, "")
Wait For rm_PickerResult (Success As Boolean, UriString As String)
If Success Then
uri.Parse(UriString)
'add code to initialize NB6
nb.CustomSound(uri)
',,,,,
End If
I am not sure that is what you want but here is a sample to pick the sound using ringtone manager and assign this sound to the notification
B4X:
Dim nb As NB6
Dim uri As Uri 'ContentResolver library
Dim rm As RingtoneManager
rm.ShowRingtonePicker("rm", rm.TYPE_NOTIFICATION, True, "")
Wait For rm_PickerResult (Success As Boolean, UriString As String)
If Success Then
uri.Parse(UriString)
'add code to initialize NB6
nb.CustomSound(uri)
',,,,,
End If