Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim MP As MediaPlayerStream
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime then MP.Initialize("mp")
Activity.LoadLayout("Layout")
End Sub
Sub Button1_Click
MP.Load("http://radio.ukr.radio:8000/ur1-aacplus-l") 'AAC+ stream
'MP.Load("http://radio.ukr.radio:8000/ur1-mp3-m") 'MP3 stream
Log("Load stream URL into RADIO")
End Sub
Sub mp_StreamReady
Log("RADIO ready to playing")
MP.SetVolume(1,1)
MP.Play
End Sub
Sub mp_StreamError (ErrorCode As String, ExtraData As Int)
Log("Error: " & ErrorCode & ", " & ExtraData)
ToastMessageShow("Error: " & ErrorCode & ", " & ExtraData, True)
End Sub
Sub mp_StreamBuffer(Percentage As Int)
Log(Percentage)
End Sub