0
votes

My app is running on a tablet having Windows 8.1 Pro.

I got lock screen access calling this:

  await BackgroundExecutionManager.RequestAccessAsync();

A time trigger run my background task with these conditions (Internet and 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();

it works properly but when I turn off my device, it does not start again.

Which condition shall I add (if it is possible)?

Same question on msdn

1

1 Answers

0
votes

for future usage, I fixed it adding another background task with a system trigger with session condition.