B4X:
If HttpUtils.IsSuccess(FileUrl) Then
File.Copy2(HttpUtils.GetInputStream(FileUrl),File.OpenOutput(File.DirRootExternal,FileName,False))
ToastMessageShow("Done", False)
Else
ToastMessageShow("Error!", False)
End If
It throw no errors, download the file, size correct, but content of the file is incomplete or bad.