I am using the background task for a various features in the application. No where in the MSDN documentation, i see how long it runs.
For example in windows phone 8 sdk, periodic agents used to run for 25 seconds. is there a specific amount that the background task runs for ?
StorageFolder folder = KnownFolders.PicturesLibrary;
StorageFile TimeLogFile = await folder.CreateFileAsync("TimeLog.txt", CreationCollisionOption.OpenIfExists);
await Windows.Storage.FileIO.AppendTextAsync(TimeLogFile, "Start Logging " + DateTime.Now.ToString() + Environment.NewLine);
await Windows.Storage.FileIO.AppendTextAsync(TimeLogFile, "Beginning of Background Task " + DateTime.Now.ToString() + Environment.NewLine);
for (int i=0;i<100000;i++)
{
await Windows.Storage.FileIO.AppendTextAsync(TimeLogFile, "During Background Task Execution " + DateTime.Now.ToString() + Environment.NewLine);
Debug.WriteLine(i);
}
await Windows.Storage.FileIO.AppendTextAsync(TimeLogFile, "End Logging " + DateTime.Now.ToString() + Environment.NewLine);