Android Question okHttpUtils2 progressSub

padvou

Active Member
Licensed User
Longtime User
Hello,
I have an old application written in an older B4A version.
I want to use the newest B4A to work with it, os I removed the httputilsservice class module and added the library reference of okHttpUtils2.
However, some things now seem to be broken, for example how do I monitor the progress of the download?
There used to be this:
B4X:
HttpUtils2Service.progressSub = "downloadProgress"
    HttpUtils2Service.timerInterval = 200
and
B4X:
Sub downloadProgress(tmp As ProgressStatus)
    'Log(Dpro.Downloaded & "/" & tmp.Total)
    Dpro.progress=Round((tmp.downloaded*100)/tmp.total)
End Sub
 

padvou

Active Member
Licensed User
Longtime User
Yes, this was a custom type I had created.
So, I now changed my project, so that it has HttpUtils2Service class module, HttpJob class module and OkHttp library.
Is this the correct approach?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…