Background task TimeTrigger
-
Wednesday, October 19, 2011 4:06 PM
I am trying to use the TimeTrigger and set up my trigger to fire every minute:
TimeTrigger trigger = new TimeTrigger(1,false);
BackgroundTaskBuilder taskBuilder = new BackgroundTaskBuilder();
taskBuilder.TaskEntryPoint = "ShowImagesTask.ShowImageOnTile";
taskBuilder.SetTrigger(trigger);
taskBuilder.Name = "ImageViewonTile";
IBackgroundTaskRegistration taskRegistration = taskBuilder.Register();Then I get the following exception on the call to Register:
exception of type "System.ArgumentException occured
Additional information: Value did not fall in expected range
I What is the expected range as 1 minute seems reasonable
john mcfetridge- Edited by JRMcFetridge Wednesday, October 19, 2011 4:07 PM
All Replies
-
Wednesday, October 19, 2011 4:54 PMModerator
TimeTrigger resolution is 15 minutes. See http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.background.timetrigger.timetrigger(v=VS.85).aspx
- Edited by Rob CaplanMicrosoft Employee, Moderator Wednesday, October 19, 2011 4:55 PM
- Marked As Answer by Matt SmallMicrosoft Employee, Moderator Friday, October 21, 2011 1:38 PM
-
Wednesday, October 19, 2011 4:56 PMouch! So I guess this is not the mechanism to use when I want to update tiles on a much more timely basis like 1 minute
john mcfetridge -
Wednesday, October 19, 2011 8:09 PMModerator
Updating every minute is much faster than is suggested. What is the usage scenario that requires that?
Please see the appropriate uses of tile notifications section at http://msdn.microsoft.com/en-us/library/windows/apps/hh465391%28v=vs.85%29.aspx#appropriate_use_of_tile_notifications which suggests that a busy app might notify every 15 minutes.
--Rob
-
Wednesday, October 19, 2011 11:08 PMI have a web traffic app that I am porting from WP7 and I would like to display a sequence of favorite cameras in the tile. Now 1-2 minute trigger would be the least to make this usable so they have some idea of the traffic. The background task would allow the updating to occur wihile the app was suspended which would be quite useful I believe.
john mcfetridge- Edited by JRMcFetridge Thursday, October 20, 2011 2:57 PM
-
Tuesday, November 15, 2011 3:19 AM
Hey,
I want to update the tile(that means changing the text on the tile) using a background task and tile notifications. Can you please help me how to relate the background task and tile notifications to achieve the update tile text.
- Edited by Kondala Rao Ravva Tuesday, November 15, 2011 3:20 AM


