Hello,
Thanks for this link. My app is not in B4X, I had already updated with android 14 and added in the manifest:
AddPermission(android.permission.FOREGROUND_SERVICE_DATA_SYNC)
SetServiceAttribute(DownloadService, android:foregroundServiceType, "dataSync")
SetServiceAttribute(HttpUtils2Service, android:foregroundServiceType, "dataSync").
Why when I first launch the app, everything works fine and if I restart the app, the downloads no longer work? Is there an object on the services to reset when opening or closing the app?
I don't understand everything about this link. What is the simplest solution?
- Currently, I am downloading in the background, should I download in the foreground (without service) using the httpjob class directly?
- Switch my project to B4X? :-(
- Can this method be a solution? how to use it?
Private Sub Service_Timeout(Params As Map)
Service.StopForeground(NotificationId)
End Sub
Thanks for your help.