Android Question ShowRingtonePicker Not Playing

Discussion in 'Android Questions' started by Jonathan Rigley, Jul 29, 2015.

  1. Jonathan Rigley

    Jonathan Rigley Member Licensed 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 :) )

    Code:
    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: Jul 29, 2015
  2. Jonathan Rigley

    Jonathan Rigley Member Licensed User

    After removing my battery for one minute and trying again it worked.......
     
Loading...