My "PollenWatch" app development is chugging along, and I'm currently working on the task of getting my Live Tile to update even when the app is not running. I've looked over the docs, and I think I know how I should do it, but I'm not 100% sure.
My app queries a web site to pull an Xml document (formatted like an RSS atom) which contains the information I need to display in-app and on the tile.
My first question is should I even bother with synchronization between the main app and the PeriodicTask, or is it safe to just have the app update the tile info when it runs and the PeriodicTask do the same?
If I do synchronize, it looks like the preferred way would be to write the XML document to a mutex-protected file in isolated storage, then update the tile from that. Again, it seems like I would need to have both the app and the PeriodicTask updating the live tile, and this is why I'm not sure that I even need to save the XML to a file in the simple case.
If I eventually wanted to make it only pull the information if the file was out of date (data only updates once per day) then it would make sense to want to coordinate between the two and use the file as a local cache to avoid hitting the web site too often.
Does my understanding seem correct and in line with best practices? Thanks.
My app queries a web site to pull an Xml document (formatted like an RSS atom) which contains the information I need to display in-app and on the tile.
My first question is should I even bother with synchronization between the main app and the PeriodicTask, or is it safe to just have the app update the tile info when it runs and the PeriodicTask do the same?
If I do synchronize, it looks like the preferred way would be to write the XML document to a mutex-protected file in isolated storage, then update the tile from that. Again, it seems like I would need to have both the app and the PeriodicTask updating the live tile, and this is why I'm not sure that I even need to save the XML to a file in the simple case.
If I eventually wanted to make it only pull the information if the file was out of date (data only updates once per day) then it would make sense to want to coordinate between the two and use the file as a local cache to avoid hitting the web site too often.
Does my understanding seem correct and in line with best practices? Thanks.
Last edited: