Dim j As HttpJob
j.Initialize("j", Me)
' noted code works well'
'j.Download("https://newsoftdown01.rbread05.cn/down/2021down/11/11/dianshijiachangxianban.apk")
'the link does't work
j.Download("https://github.com/cnteddybear/Json/blob/main/1.apk")
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Dim out As OutputStream = File.OpenOutput(Starter.Provider.SharedFolder, ApkName, False)
File.Copy2(j.GetInputStream, out)
out.Close '<------ very important
Log(Starter.Provider.SharedFolder)
Else
Log("Error: " & j.ErrorMessage)
End If
j.Release
Log("apk="&File.Size(Starter.Provider.SharedFolder,ApkName))
'File.Copy (File.DirAssets,"1.apk", Starter.Provider.SharedFolder,ApkName)