12. August 2012 17:51
So far, this series has talked about all kinds of problems you may run into with background agents, like API restrictions, timeout/memory constraints, data exchange between your app and your agent and finally possible error conditions when you want to create tasks. There's one additional topic I want to talk about briefly, because it's a really important one, and it took me a while to figure out the exact inner workings of it myself.
Part 5: Expiration Time
When I started working with background agents, there were only a few vague hints available for a particular behavior of the operating system regarding their expiration. It wasn't clear to me what exactly happens and what an app is responsible for (or allowed to do) with regards to this, so I went through some painful experience to learn the details (for example, an update for the SilverlightShow app to fix an issue with this was needed). Luckily, the documentation on MSDN on this is much better today, and together with my following explanation hopefully you won't have to go through the same process like me. More...