I am trying to run a background task every 15 minutes using the TimeTrigger but for some reason it wouldn't fire. Tried the Lifecycle Events method and it worked. Checked the task is registered in the power shell. What else can be wrong? One thing I found strangely is when I run
var allowed = await BackgroundExecutionManager.RequestAccessAsync();
I get back BackgroundAccessStatus.AllowedSubjectToSystemPolicy instead of
BackgroundAccessStatus.AllowedMayUseActiveRealTimeConnectivity or BackgroundAccessStatus.AllowedWithAlwaysOnRealTimeConnectivity
Is that the problem? What is BackgroundAccessStatus.AllowedSubjectToSystemPolicy?
Update:
AllowedMayUseActiveRealTimeConnectivity and AllowedWithAlwaysOnRealTimeConnectivity are deprecated.
Reboot made it work, both the desktop and mobile. Apparently it's easy to crash the background task process.
Also use this to debug on the desktop:
https://docs.microsoft.com/en-us/windows/uwp/launch-resume/debug-a-background-task