deba
deba

Reputation: 97

How to perform background synchronizations in uwp (like android)

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.).

Upvotes: 0

Views: 62

Answers (1)

Junjie Zhu - MSFT
Junjie Zhu - MSFT

Reputation: 3049

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.

Upvotes: 1

Related Questions