开发者

How to programmatically turn GPS on and off in Windows Phone 7

So far, to turn on and off the GPS device in Wp7, I do it in Settings Menu. Wonder If this can be done in code?

Thanks

---------- Update

Sorry for the confusion. I开发者_StackOverflow社区nstead of turning GPS on and off, What I really mean is how to turn on and off the LOCATION in the Settings Menu of Wp7.


You can get the GPS data but you are not able to turn the sensor on or off via your application.

The most you can do in your application is start the geolocation data acquisition and stop it.


Windows Phone 7 apps should not change global settings for the phone.

You should have your own settings page in your app, with it's own toggle for whether or not your app should use the location data.

Then you check your setting before you access the location data.

Why would you want to turn it off globally?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜