I have a WP7 application that I've disabled the idle capabilities of the phone with such as:

PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
PhoneApplicationService.Current.ApplicationIdleDetectionMode = 
                                                        IdleDetectionMode.Disabled;

However, the camera button and start menu still pause the application and resume it afterwards. I want the app to run regardless of these buttons being pushed. How can I prevent these buttons from tombstoning the app?

有帮助吗?

解决方案

Tombstoning always occurs if the user presses the windows key or camera button. The code you've shown ensures that your app will continue to run under a lock screen, not if it will run when your app is tombstoned. In the current version (7.0), there is no multitasking for third parties, whereas Mango (7.1) allows for some more freedom with respect to multitasking.

Presumably this app is targetted at 7.0, so your app will be tombstoned and you will have to handle it. There is no way of having your app continue running in the background.

On a side note, you'll still have to handle tombstoning in Mango as well, but you do get more abilities to run your app in the background.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top