I have developed a windows 8 app which involves the Live tile being invoked through Background Task thus displaying certain RSS Feeds.
However, when i install the app and right click on the tile, the button app bar does not have the button to turn off/on live tiles, i.e. Live tiles do not work.
However in a day or 12 hours, Live tiles start getting automatically updated.
How can i Make the Live tiles Run immediately after the installation?(Keeping in mind that these are Rss feeds to be displayed).
My Code-
private async void RegisterBackgroundTask()
{
try
{
var backgroundAccessStatus = await BackgroundExecutionManager.RequestAccessAsync();
if (backgroundAccessStatus == BackgroundAccessStatus.AllowedMayUseActiveRealTimeConnectivity ||
backgroundAccessStatus == BackgroundAccessStatus.AllowedWithAlwaysOnRealTimeConnectivity)
{
foreach (var task in BackgroundTaskRegistration.AllTasks)
{
if (task.Value.Name == taskName)
{
task.Value.Unregister(true);
}
}
BackgroundTaskBuilder taskBuilder = new BackgroundTaskBuilder();
taskBuilder.Name = taskName;
taskBuilder.TaskEntryPoint = taskEntryPoint;
taskBuilder.SetTrigger(new TimeTrigger(15, false));
var registration = taskBuilder.Register();
}
}
catch
{ }
}