none
Live Tiles updation starts after a day in Background Task.How to Start instantly.

    Question

  • 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
                { }
             }

    Friday, January 10, 2014 6:43 PM

Answers

  • Hi,

    Do you use the HttpClient to get the content in Network and register this with backGround Task in your app. This background task executes periodically and can update the tile of the app during its execution. The minimum frequency of background tasks is 15 minutes:

    http://msdn.microsoft.com/en-us/library/windows/apps/jj991805.aspx

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, January 15, 2014 9:39 AM

All replies

  • Hi,

    An app cannot update it's tile without running at least once.  Because apps do not run immediately on installation, it isn't possible for a tile to be "live" until it is launched. So you cannot make the live tiles run immediately after the installation.

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Proposed as answer by Dave SmitsMVP Monday, January 13, 2014 7:45 AM
    Monday, January 13, 2014 5:44 AM
  • I get your Point there.

    But my problem lies even after starting the app once.

    After installing also, i ran my app, then too the problem persisted.

    Thanks!

    Wednesday, January 15, 2014 6:39 AM
  • Hi,

    Do you use the HttpClient to get the content in Network and register this with backGround Task in your app. This background task executes periodically and can update the tile of the app during its execution. The minimum frequency of background tasks is 15 minutes:

    http://msdn.microsoft.com/en-us/library/windows/apps/jj991805.aspx

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, January 15, 2014 9:39 AM