Android Question Problem loadhtml with <img>

hung

Member
Licensed User
Longtime User
I am using OkHttpUtils2 to create httpjob as below

B4X:
    Dim lHttpJob As HttpJob ' use local resource to avoid crash
    lHttpJob.Initialize("job1", Me)
    lHttpJob.PostString("https://abcd.com/test.php", "pageno=p1")

B4X:
Sub JobDone (Job As HttpJob)
    If Job.Success = True Then
        Select Job.JobName
            Case "job1"
                webview.LoadHtml(Job.GetString)
...
   Job.release
End sub

The page returns something like below to Job.GetString
B4X:
<html>
<body>
Picture 1: <img src=p1.jpg>
</body>
</html>

I am expecting the webview shows a html page with the picture loaded. But the word "Picture 1:" shows with a broken image.

Any solution for this?
 

aeric

Expert
Licensed User
Longtime User
HTML:
<img src=“p1.jpg” />
 
Upvote 0
Top