0

I have an app where large chunk of data need to be synchronized whenever push message comes.

When app is running its working ok. But if app is not running, then when push comes, synchronization appservice is terminated by platform after short time as it requires more that 25 sec (it may need to run 10-20 minutes depending on situation).

This synchronization module, utilizes uwp background-downloader for direct file download, but it also need to do computation by code also (i.e. conditional download decision, parsing, merging etc.).

deba
  • 87
  • 5

1 Answers1

1

You can create an application trigger, this allows work to be done in the background after users close the foreground app.

Background tasks are limited to 30 seconds of wall-clock usage. It is recommended to use capability extendedBackgroundTaskTime to remove these limits. You can refer to Run background tasks indefinitely for more information.

Junjie Zhu - MSFT
  • 2,086
  • 1
  • 2
  • 6
  • extendedBackgroundTaskTime seems restricted capability. Will Microsoft allow Store App to publish App with this capability ? There is one warning by Microsoft that "Be aware that you can't put an app into the Microsoft Store if it uses these APIs." – deba Dec 01 '22 at 15:45
  • You need to tell the Store why your app needs to declare the capability and how it is used. You can refer to [this](https://learn.microsoft.com/en-us/windows/apps/publish/publish-your-app/manage-submission-options?pivots=store-installer-msix#restricted-capabilities) for more information. – Junjie Zhu - MSFT Dec 02 '22 at 02:26