padvou Active Member Licensed User Longtime User Feb 16, 2017 #1 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: Code: Copy HttpUtils2Service.progressSub = "downloadProgress" HttpUtils2Service.timerInterval = 200 and Code: Copy Sub downloadProgress(tmp As ProgressStatus) 'Log(Dpro.Downloaded & "/" & tmp.Total) Dpro.progress=Round((tmp.downloaded*100)/tmp.total) End Sub
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: Code: Copy HttpUtils2Service.progressSub = "downloadProgress" HttpUtils2Service.timerInterval = 200 and Code: Copy Sub downloadProgress(tmp As ProgressStatus) 'Log(Dpro.Downloaded & "/" & tmp.Total) Dpro.progress=Round((tmp.downloaded*100)/tmp.total) End Sub
Erel B4X founder Staff member Licensed User Longtime User Feb 16, 2017 #2 padvou said: However, some things now seem to be broken Click to expand... There were never such methods in the official HttpUtils2 implementation. See this thread: https://www.b4x.com/android/forum/threads/download-huge-files-with-httputils2.30220/#content Upvote 0
padvou said: However, some things now seem to be broken Click to expand... There were never such methods in the official HttpUtils2 implementation. See this thread: https://www.b4x.com/android/forum/threads/download-huge-files-with-httputils2.30220/#content
padvou Active Member Licensed User Longtime User Feb 16, 2017 #3 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
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?
Erel B4X founder Staff member Licensed User Longtime User Feb 16, 2017 #4 The code in that link implements this feature. You don't need to change it. Upvote 0