I using this code to read https page
I dont know how to display result to WebbView
B4X:
Activity.LoadLayout("Layout")
Dim hc As OkHttpClient
hc.InitializeAcceptAll("hc")
Dim req As OkHttpRequest
req.InitializePost2("https://10.2.4.64/MobileOffice/D2548BA4-E6FD-43A0-9423-F4AE0BC7B710/Phone/Auth/Authorize/869817035803227888", "".GetBytes("UTF8"))
req.SetHeader("User-Agent","Mozilla/5.0 (Android; Linux armv7l; rv:5.0) Gecko/20110615 Firefox/5.0 Fennec/5.0")
hc.Execute(req,1000)
Sub hc_ResponseSuccess (Response As OkHttpResponse, TaskId As Int)
Dim out As OutputStream
out.InitializeToBytesArray(0)
Response.GetAsynchronously("res", out, False, TaskId)
WebView1.LoadHtml(out)
End Sub
Sub res_StreamFinish (Success As Boolean, TaskId As Int)
Log($" ${Success}"$)
End Sub
Sub hc_ResponseError (Response As OkHttpResponse, Reason As String, StatusCode As Int, TaskId As Int)
Log($"Error: ${Response.ErrorResponse}, ${Reason}, ${StatusCode}"$)
If Response <> Null Then Response.Release
End Sub
I dont know how to display result to WebbView