I'm using the following code to play the ringtone using the media player. I'm adding an IF statement to play the Notifications sound but notifications doesn't work. I get a runtime error File Not Found Exception.
B4X:
Sub Play_Ringer
Dim r As Reflector
r.Target = "ContentDir"
r.Target = r.RunMethod("intern")
If Main.pPhoneType = "NONE" Then
mpp.Load(r.Target, "content://settings/system/notifications")
Else
mpp.Load(r.Target, "content://settings/system/ringtone")
End If
mpp.Play
End Sub