I want to make an app for my web radio.

shmexy030

New Member
Hello , im new in b4a programming , can someone help me
to make an app for a web radio .
Can someone give me the instructions and the code.
Thanks
 

shmexy030

New Member
Ive tryed this code , add the design , and it says : Media_Error_Unknown, 0


#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
 
Upvote 0
Hello, i'm not good on talking/writing english so, i beg your pardon for any mistake that I will do ...
I've bought the full version of b4a and would be my intention realize an app for my personal web radio.
Could anyone suggest, if available, a tutorial that can help me to create the app that i need ?

Thanks in advance, any help will be appreciated.

Best regards, Massimiliano.
 
Upvote 0
First thanks for your answer, no i nedd an app ( as a audio player ) but that can be pointed to a shoutcast streaming server that actually is up and streaming music ...
 
Upvote 0

PenguinHero

Member
Licensed User
Longtime User
Hi All,

I just found this thread, and want to ask a follow up question on this topic.
I've used MediaPlayerStream to write a simple internet radio app, and its working well.

My question is that I have seem other similar apps display information from the station such as artist & title, etc.
There doesn't seem to be a property in MediaPlayerStream to support this. Can it be done?

Thanks.
 
Last edited:
Upvote 0
Top