B4J Question Very simple web page to text field example

ElliotHC

Active Member
Licensed User
I've been trying to find a very straight forward example of how to do this in B4J.

Dim URL as String
URL = "https://myurl.com"

Click a Button

All the text on that above page goes in to a text field.

Anyone know how to do this?
 

ilan

Expert
Licensed User
Longtime User
try this:

B4X:
Dim URL as String = "https://myurl.com"

Dim j As HttpJob
j.Initialize("", Me)
j.Download(URL )
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
   Log(j.GetString)
  Textfield1.Text = j.GetString
End If
j.Release
 
Last edited:
Upvote 0

ElliotHC

Active Member
Licensed User
try this:

B4X:
Dim URL as String = "https://myurl.com"

Dim j As HttpJob
j.Initialize("", Me)
j.Download(URL )
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
   Log(j.GetString)
  Textfield1.Text = j.GetString
End If
j.Release

That has worked perfectly. Thank you ilan.
 
Upvote 0
Top