同样的问题
我的应用程序在Windows 8.1 Pro的平板电脑上运行。
我得到了锁屏访问调用:
await BackgroundExecutionManager.RequestAccessAsync();
一个时间触发器运行我的后台任务与这些条件(Internet和UserPresent):
// adding condition
SystemCondition internetCondition = new SystemCondition(SystemConditionType.InternetAvailable);
SystemCondition userPresentCondition = new SystemCondition(SystemConditionType.UserPresent);
builder.AddCondition(internetCondition);
builder.AddCondition(userPresentCondition);
BackgroundTaskRegistration taskRegistration = builder.Register();
它工作正常,但当我关闭我的设备,它不会再次启动。
如果可以的话,我需要添加哪些条件?
msdn
为了将来的使用,我添加了另一个带有会话条件的系统触发器的后台任务来修复它。