Hi All
I have an app that will have a Phone Call Open. When a SMS arrives in I do not get the notification sound, just a vibration.
I have tried:
The notification will not play. I now think if I can copy the default notification file to the file assets folder then I can play it with media player.
Help appreciated
Regards
John.
I have an app that will have a Phone Call Open. When a SMS arrives in I do not get the notification sound, just a vibration.
I have tried:
B4X:
Sub play_default_notification
Dim rm As RingtoneManager
PlayRingtone(rm.GetDefault(rm.TYPE_NOTIFICATION))
End Sub
Sub PlayRingtone(url As String)
Dim jo As JavaObject
jo.InitializeStatic("android.media.RingtoneManager")
Dim jo2 As JavaObject
jo2.InitializeContext
mod_media.set_mode(mod_media.MODE_NORMAL)
Dim u As Uri
u.Parse(url)
jo.RunMethodJO("getRingtone", Array(jo2, u)).RunMethod("play", Null)
End Sub
The notification will not play. I now think if I can copy the default notification file to the file assets folder then I can play it with media player.
Help appreciated
Regards
John.