Creating service (demon) applications
Is it possible to create a service type application开发者_开发知识库s in Windows Phone 7? Can there be a resident app that has no UI, but active all the time in the background?
Unfortunately, no. You can create background applications only if you work for Microsoft or an OEM. Currently, all 3rd party developer apps get 'tombstoned', i.e. their process is no longer active, just some state information can optionally be saved, when the user navigates away from the application.
Not possible. Non-Microsoft applications cannot run in the background.
The only thing you can do is handle push notifications. Multi tasking for 3rd party developers is supposedly coming soon though.
Here is some good info:
http://channel9.msdn.com/Learn/Courses/WP7TrainingKit/WP7Silverlight/UsingPushNotificationsLab
WP doesn’t allow your application to run code in a background process, which means your application can’t poll some web service for information. Push Notification compensate for that restriction and allows you to send messages to a Windows Phone device even if your application is not currently running.
Here is more information regarding other options like tombstoning (but I don't think you just want to suspend):
http://windowsteamblog.com/windows_phone/b/wpdev/archive/2010/07/15/understanding-the-windows-phone-application-execution-model-tombstoning-launcher-and-choosers-and-few-more-things-that-are-on-the-way-part-1.aspx
I think these answers should be revised, apparently the latest release of Mango permits the use of Services..
Here's an article on the subject - Leveraging Background Services and Agents in Windows Phone 7 (Mango)
精彩评论