Hi Uhlmann,
Welcome to our Microsoft Q&A platform!
For Android, to upload data in the background, you can try to create Android service.
A service is an application component which can perform long-running operations in the background. It does not provide a user interface. After startup, even if the user switches to another application, the service will continue to run for a while. About Android service, here is a Xamarin.Android documentation: Creating Android Services.
For iOS, you can call NSUrlSessionConfiguration.CreateBackgroundSessionConfiguration(String) Method.
NSUrlSessionConfiguration backgroundSessionConfiguration = NSUrlSessionConfiguration.CreateBackgroundSessionConfiguration(@"identifier");
NSUrlSession backgroundSession = NSUrlSession.FromConfiguration(backgroundSessionConfiguration);
NSUrlSessionUploadTask uploadtask = backgroundSession.CreateUploadTask(request, fileURL);
It will create a session configuration object that allows HTTP and HTTPS uploads or downloads to be performed in the background. The session with "background session configuration" will run in a separate process. In iOS, data is still transferred when the application is suspended or terminated. Here is a “Background transfer” documentation you can refer to: Background transfer and NSURLSession in Xamarin.iOS.
Best Regards,
Kyle Wang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.