Hi,
I am using the following code to play a "message" ringtone.
Sub makeNotificationsound
After upgrading to Android 5.02, I get the following error: "Direct file access no longer supported; ringtone playback is available through android.media.Ringtone"
What is the proper way to play a default sound?
I am using the following code to play a "message" ringtone.
Sub makeNotificationsound
' ** Vibrate ...
Dim pv As PhoneVibrate
pv.Vibrate(1000)
' ** Play default authentication sound ...
Dim mp As MediaPlayer
mp.Initialize
' ** Use ringtone manager to get default sound ...
Dim rm As RingtoneManager
mp.Load(rm.GetContentDir, rm.GetDefault(rm.TYPE_NOTIFICATION))
mp.Play
End SubDim pv As PhoneVibrate
pv.Vibrate(1000)
' ** Play default authentication sound ...
Dim mp As MediaPlayer
mp.Initialize
' ** Use ringtone manager to get default sound ...
Dim rm As RingtoneManager
mp.Load(rm.GetContentDir, rm.GetDefault(rm.TYPE_NOTIFICATION))
mp.Play
After upgrading to Android 5.02, I get the following error: "Direct file access no longer supported; ringtone playback is available through android.media.Ringtone"
What is the proper way to play a default sound?