I’m writing an application for some Geolocalization.
How can i programmatically enable / disable location service from my application? like a settings page into my personal application ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In your application you should try and use the Location service (GeoCoordinateWatcher), you should then check the Permission property, if this is set to Denied then this means that the user has, externally to your application, disabled location services on their phone therefore this is all you need to be concerned with. You can display a friendly message telling the user that certain features within your application will not be available but you leave the decision, to enable location services, up to the user.
The following article details the watcher_StatusChanged event handler, which includes the above check :-
http://msdn.microsoft.com/en-us/library/ff431782%28v=vs.92%29.aspx