Understanding the WP7.1 Periodic Agents API
Join the DZone community and get the full member experience.Join For Free
It seems that developers are confused about the role periodic agents have with their apps. The short version of the story is that periodic agents are supposed to support your app, not replace it. To this end a periodic agent must be re-registered at least every fourteen days. Typically this is accomplished by re-registering your app on every startup. So I am curious as to whether people are building apps they think only have background agent functionality. --Scott Wildermuth
Wildermuth says he's confused as to why anyone would run the API from published applications and shows you how to remove the need to ever do this:
The trick is to put the code you need to launch from both places in a shared library. For example, you can see here a Windows Phone 7 application in Visual Studio’s Solution Explorer:
You can get the full picture at his blog post: http://wildermuth.com/2011/10/15/Confusion_Around_WP7_1_Periodic_Agents
Opinions expressed by DZone contributors are their own.