My tablet runs Windows 8.1 pro.
It has a background task which is triggered by a Time Trigger every 15'. It works, fair enough.
The problem is that I need to auto-launch my background task at every single boot (start app) of my device.
I registered my bg by this code:
builder.Name = "bikePositionUpdate";
builder.TaskEntryPoint = "BackgroundTaskGps.BikeGPSPositionUpdateBackgroundTask";
builder.SetTrigger(new TimeTrigger(15, false)); //
// adding condition
SystemCondition internetCondition = new SystemCondition(SystemConditionType.InternetAvailable);
SystemCondition userPresentCondition = new SystemCondition(SystemConditionType.UserPresent);
builder.AddCondition(internetCondition);
builder.AddCondition(userPresentCondition);
BackgroundTaskRegistration taskRegistration = builder.Register();
my app has lock screen access
await BackgroundExecutionManager.RequestAccessAsync();
How can I achieve this? Am I missing something?