Loading a web page

Scorn

Member
Evening, I am trying to load a webpage into my app, the webpage consists of a chatroom, i have tried a few things from the wiki etc but cant get this to work.
I am a noob at programming in general.
 

Scorn

Member
Im trying to load the page so it fills the screen, as if the app was working as a browser, but without any controls ( forward back etc ) The page I want to load is the chatroom of a radio station, I already have the streaming audio working.

Pulling my hair out here :(
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
Care to post your code? and the link to the chat room?.

To load a website you have to create a WebView and then load the URL, something like this:

B4X:
WebView1.Width = 100%x
WebView1.Height = 100%y

WebView1.LoadURL("http://website.com")
 
Upvote 0

Scorn

Member
here is my code, i have added you snippet but it still dosent work for me.
'Activity module

Sub Process_Globals
Dim mp As MediaPlayerStream
End Sub

Sub Globals

End Sub

Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
mp.Initialize("mp")
End If
mp.Load("http://64.71.162.108:8541")
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

WebView1.Width = 100%x
WebView1.Height = 100%y

WebView1.LoadURL("http://radio.team174.co.uk")
 
Upvote 0
Top