Hello,
I have a problem with smartphones under Android 14 for downloading. I have never had a problem before (Android 13 or lower - since 2020).
I use the Downloadservice and HttpUtils2service classes.
When I launch the application for the first time (and it remains in the background), the download works well. But if I exit the application, the download no longer takes place, it remains pending.
In the log, I have this message:
sending message to waiting queue (CallSubDelayed - StartDownload)
Thank you for your help.
I have a problem with smartphones under Android 14 for downloading. I have never had a problem before (Android 13 or lower - since 2020).
I use the Downloadservice and HttpUtils2service classes.
When I launch the application for the first time (and it remains in the background), the download works well. But if I exit the application, the download no longer takes place, it remains pending.
In the log, I have this message:
sending message to waiting queue (CallSubDelayed - StartDownload)
B4X:
Private Sub stat_Click
Dim ff As DownloadData
ff.url = "https://exemple/..."
ff.EventName = "ff"
ff.Target = Me
CallSubDelayed2(DownloadService, "StartDownload", ff)
Wait For ff_fin
'si téléchargement est OK
If download=True Then
....
End Sub
Sub ff_Complete(Job As HttpJob)
If Job.Success Then
Dim out As OutputStream = File.OpenOutput(File.DirInternal, "api.csv", False)
File.Copy2(Job.GetInputStream, out)
out.Close
download=True
Job.Release
CallSubDelayed(Me,"ff_fin")
Else
download=False
Job.Release
CallSubDelayed(Me,"ff_fin")
End If
End Sub
Thank you for your help.