I am trying to figure out how a UWP app can keep its data updated **without having to be in foreground at all times**.

For example, imagine an UWP app that is getting its data from somewhere. That data may change meaning that the UWP app will have to refresh it. I would like to have some kind of component doing that refreshing in background regardless whether UWP app is in foreground or not (whether user is staring at it or not).

In Android, you can use non-sticky-service or pending intent for this.

On IOS, I heard you can use something called BackgroundAppRefresh.

I did some research on UWP side and I am looking at AppService and I see it can be run out-of-app process or in-app process. 

However, an in-app process Windows 10 AppService will be killed if app is back-grounded (user is not staring at it). And an out-of-app process Windows 10 AppService will run up to 30sec and then be killed <https://learn.microsoft.com/en-us/windows/uwp/launch-resume/how-to-create-and-consume-an-app-service>.

This means that my background syncing will not work since it will be stopped after maximum of 30 seconds if user is not having the UWP app in foreground (user is looking at it).

So, I concluded that Windows 10 AppService is not what I can use to implement this functionality. 

How and what I can use to implement something like this in UWP?