I saw, that OkHttp2Utils can also be used to download big file of 100MB with
The code is very simple compared to myold way of using OkHttpRequest:
But I do not read anything about of reporting a progress in the first methode. Is it not possible?
B4X:
Dim Link As String= InternetFolder & FileName
Dim MyJob As HttpJob
MyJob.Initialize("", Me)
MyJob.Download(Link)
Wait For (MyJob) JobDone(MyJob As HttpJob)
If MyJob.Success Then
....
The code is very simple compared to myold way of using OkHttpRequest:
B4X:
Dim Request As OkHttpRequest
MyHttp.Initialize("MyHttp")
Request.InitializeGet(InternetFolder & FileName)
FileNameOfTask(1)=FileName
MyHttp.Execute(Request,1)
Log(" http start")
End Sub
Private Sub MyHttp_ResponseSuccess (Response As OkHttpResponse, TaskId As Int)
Log(" http response =" & Response.ContentLength )
....
But I do not read anything about of reporting a progress in the first methode. Is it not possible?