Hi
I'm trying to save the downloaded file with this code:
but nothing happens, If i write the path to the folder:
I'am getting this error:
I'm trying to save the downloaded file with this code:
B4X:
Sub DownloadAndSaveFile (Link As String)
Dim j As HttpJob
j.Initialize("", Me)
j.Download(Link)
Wait For (j) JobDone(j As HttpJob)
If j.Success = True Then
Dim out As OutputStream = File.OpenOutput(File.DirInternal, "Stop.mp3", False)
File.Copy2Async(j.GetInputStream, out)
out.Close
Log("Success")
Else
Log("Fail")
End If
j.Release
End Sub
B4X:
Dim out As OutputStream = File.OpenOutput("/storage/emulated/0/LS2018", "Stop.mp3", False)