Windows Phone: Background Agents Pitfall (5 of n)

by Mister Goodcat 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...

Tags: , ,

Programming

Windows Phone: Background Agents Pitfalls (4 of n)

by Mister Goodcat 2. May 2012 07:00

It's been a while since the last part of my series on background agent pitfalls, where I talked about data exchange between your app and the agent, and what potential errors and edge cases you may run into with that. There are a few more topics I wanted to create awareness for, so today I'll continue with…

Part 4: Exceptions, exceptions, exceptions

A lot of things can go wrong when you work with agents, and one of the places that are particularly interesting is at the very beginning – when you try to schedule your task. There are a hand full of conditions that may prevent you from doing this, and knowing about them to e.g. add proper error handling is vital. In this part I'll show and explain to you the individual error cases, and talk about how to work around them, if that's possible at all. More...

Tags: , ,

Programming

Windows Phone: Background Agents Pitfalls (3 of n)

by Mister Goodcat 27. February 2012 05:32

In the previous part of this mini-series, we have learned about some limitations of agents regarding memory and execution time. Although these restrictions are severe in their details, they are nothing new to developers on the phone. Memory usage caps also exist for normal applications, and we do have quite some time-based requirements there too. When you work with background agents, you're however also facing a new class of problems that is completely irrelevant and non-existing to normal app developers. More...

Tags: ,

Programming

Windows Phone: Background Agents Pitfalls (2 of n)

by Mister Goodcat 24. February 2012 00:21

In the first part of this series, I mainly talked about issues with software design when you work with background agents. We saw that the partly really strict API limitations can have a pretty severe effect on how you need to structure your code to follow all requirements of the validation and certification process. This time, I want to get a bit more technical, when we learn about some other limitations of agents. More...

Tags: ,

Programming

Windows Phone: Background Agents Pitfalls (1 of n)

by Mister Goodcat 19. February 2012 20:24

There's a ton of resources available on the web that talks about the new features of Windows Phone 7.5 "Mango" for developers, and about background agents in particular. Unfortunately, a lot of these resources use over-simplified samples that have little in common with complex real-world setups, and often the articles you can find don't even mention the several restrictions in place for background agents at all. In this open-ended mini series I am going to talk about the various problems you will potentially run into with anything but the most trivial applications, what effects and consequences this has for your application development, and how you can avoid pitfalls and plan ahead for background agents. This is not a general introduction on the topic; I assume that you are familiar with the concept and have a basic understanding on how agents work. More...

Tags: ,

Programming