Hello sir,
My code is
When using above code, i didn't get any file, i.e. no any file downloaded.
My code is
B4X:
Sub Process_Globals
Dim job7 As HttpJob
End Sub
Sub Global
Dim FileName As String
End Sub
Public Sub downLoadFile()
FileName="a.txt"
Dim FilePath As String="http://192.168.0.36/UWS1/UWS/Temp/a.txt"
job7.Initialize("job7", Me)
job7.Download(path)
End Sub
Sub JobDone (job As HttpJob)
If job.JobName="job7" Then
If job.Success Then
Log(job.Tag)
Dim out As OutputStream = File.OpenOutput(File.DirRootExternal, FileName, False)
File.Copy2(job.GetInputStream, out)
out.Close
Else
Log("Error: " & job.ErrorMessage)
End If
Else
Log("Error: " & job.ErrorMessage)
ToastMessageShow("Error: " & job.ErrorMessage, True)
End If
job.Release
End Sub
When using above code, i didn't get any file, i.e. no any file downloaded.
Last edited: