I tried to get progress displaying on a HTTPS download using the thread at https://www.b4x.com/android/forum/threads/how-to-show-progress-on-https-download.138174
That thread's coding seemed very convoluted to me and Erel advised me to convert the app to B4XPages. I did that and had problems (which were resolved) as shown in /https://www.b4x.com/android/forum/t...ress-bar-and-wait-for-for-it-to-finsh.138365/
I have HU2_PUBLIC in the Conditional Symbols for Build Configuration and I have library OkHttpUtils2 included.
However, I'm still not able to get the progress display working. I would like to get rid of the convoluted code (from the first thread) and use the simpler code similar to that for a FTP download:
There may be errors in the above code as I haven't yet fully written the FTP-using app let alone tested it.
Can an HTTPS download use similar code to monitor the progress of the HTTPS download?
PS what does HU2_PUBLIC in the Configuration mean & do?
That thread's coding seemed very convoluted to me and Erel advised me to convert the app to B4XPages. I did that and had problems (which were resolved) as shown in /https://www.b4x.com/android/forum/t...ress-bar-and-wait-for-for-it-to-finsh.138365/
I have HU2_PUBLIC in the Conditional Symbols for Build Configuration and I have library OkHttpUtils2 included.
However, I'm still not able to get the progress display working. I would like to get rid of the convoluted code (from the first thread) and use the simpler code similar to that for a FTP download:
B4X:
Dim FTP1 As FTP
FTP1.Initialize("FTP", "rose.myddns.me", 21, "john", "Rose33126")
FTP1.PassiveMode = True
FTP1.UseSSL = True
Log("Started FTP")
Sleep(0)
Dim sf As Object = FTP1.DownloadFile(ServerPath, True, File.DirAssets, FileName)
Wait For (sf) FTP1_DownloadCompleted (ServerPath As String, Success As Boolean)
If Success Then .....
Private Sub FTP_DownloadProgress(ServerPath As String, TotalDownLoaded As Long, Total As Long)
Log("Downloaded: " & Round(TotalDownLoaded / 1000) & "kb")
ProgressBarDownload.Progress=TotalDownLoaded*100/Total
Sleep(100)
End Sub
Can an HTTPS download use similar code to monitor the progress of the HTTPS download?
PS what does HU2_PUBLIC in the Configuration mean & do?