Android Question ShowRingtonePicker Not Playing

Jonathan Rigley

Member
Licensed User
Longtime User
Hi,

I'm using the example from another thread to play a notification tone with the media player. However the tone is never played. No error is raised and debug hits the play command just fine. What could I be doing wrong? (PS Yes my volume is up :) )

B4X:
Sub Process_Globals
  Dim rm As RingtoneManager
  Dim mp As MediaPlayer
End Sub

Sub Globals

End Sub

Sub Activity_Create(FirstTime As Boolean)
   rm.ShowRingtonePicker("rm", rm.TYPE_NOTIFICATION, True, "")
End Sub

Sub rm_PickerResult (Success As Boolean, Uri As String)
   Log(Uri)
   Dim mp As MediaPlayer
   mp.Initialize
   mp.Load(rm.GetContentDir, Uri)
   mp.Play
End Sub

The Log showed a Uri of: content://media/internal/audio/media/14

Thank you
 
Last edited:
Top