Reputation: 597
I created a very simple UWP app
public MainPage()
{
this.InitializeComponent();
// In a real app, these would be initialized with actual data
string from = "Jennifer Parker";
string subject = "Photos from our trip";
string body = "Check out these awesome photos I took while in New Zealand!";
// Construct the tile content
TileContent content = new TileContent()
{
Visual = new TileVisual()
{
TileMedium = new TileBinding()
{
Content = new TileBindingContentPhotos()
{
Images =
{
new TileBasicImage()
{
Source = "Assets/images-15.jpg"
},
new TileBasicImage()
{
Source = "Assets/images-7.jpg"
},
new TileBasicImage()
{
Source = "Assets/trolltunga.jpg",
}
// TODO: Can have 12 images total
}
}
}
// TODO: Add other tile sizes
}
};
var notification = new TileNotification(content.GetXml());
TileUpdateManager.CreateTileUpdaterForApplication().Update(notification);
}
So it app just for check how long tile will update. So I read that this tile will update all the time but tile stoped update after 1-2 days (wasn't able to check correctly). So my question is - does somebody know about life cycle update for tiles? I found information about background task, but this tile doesn't use customs background task
Upvotes: 2
Views: 116
Reputation: 32775
To send a notification to the tile, use the TileUpdateManager
to create a tile updater for the primary tile, and send the notification by calling "Update". Regardless of whether it's visible, your app's primary tile always exists, so you can send notifications to it even when it's not pinned. If the user pins your primary tile later, the notifications that you sent will appear then. And the content of tile will not change until you modify the tile.
I found information about background task, but this tile doesn't use customs background task.
The background task used by tile is not a special one. The normal background task used for updating tile content every 15 mins form the article. The purpose of using background task is to ensure that the contents of the tile are updated in time when the application was suspend. And you could also use PushNotificationTrigger
to dynamically update tiles from web server.
So I read that this tile will update all the time but tile stoped update after 1-2 days
By default, local tile and badge notifications don't expire, while push, periodic, and scheduled notifications expire after three days. Because tile content shouldn't persist longer than necessary, it's a best practice to set an expiration time that makes sense for your app, especially on local tile and badge notifications.
Upvotes: 2