Hi, i try to change the url with another url (other radio) and i listen music.
Someone could you help me .
follow my program:
#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
Dim mp As MediaPlayerStream
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim Button1 As Button
Dim Button2 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("radioscreen")
If FirstTime Then
mp.Initialize("mp")
End If
' mp.Load("http://www.switch3.castup.net/cunet/gm.asp?ai=31&ar=Reshet_Bet")
mp.Load("http://radio.glz.co.il:8000/galatz")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub mp_StreamReady
Log("starts playing")
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
Sub Button1_Click
mp.Play
End Sub
Sub Button2_Click
mp.Pause
End Sub