简体   繁体   中英

How to update a secondary tiles in windows phone 8.1 using database

I need to update a secondary tile.

I am using sqlite database used to store some data.

I've searched internet over this issues, I got only one solution as XML schema.

But I need to update secondary tiles via database query.

So Is it possible to update it or not.

Please help.. Thank You

You have to update your tile's content through notifications . You will have to query your database and transform the response as an XML template that can be rendered by the tile.

Here is a link to the documentation: Quickstart: Sending a tile update (XAML) . Note that you will have to call TileUpdateManager.CreateTileUpdaterForSecondaryTile() instead of TileUpdateManager.CreateTileUpdaterForApplication() as explained in the link to target the secondary tile.

You can also have a look at this sample : Secondary tiles sample since it provided some helper classes to generate the XML for updating the tiles.

For periodic updates you have two options:

I think the better solution for you is the backgruond task.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM