bratsche
bratsche

Reputation: 2674

Getting access to the location services

I'm trying to acquire the current lat/long from a WP7 device, and I've found a few tutorials on doing this which I'm using as a basis.

However, watching the StatusChanged events in Visual Studio I see it change from Initializing to Disabled. Looking at the Permission, it says Denied. It never gets to PositionChanged.

Reading the docs for the permissions, they just say that the user may have disabled location services on the phone. But that's not the case here, they're definitely enabled under settings, and I've verified that the Maps app is working.

Am I missing something obvious? Is there a way for users to selectively enable/disable location services for apps?

Upvotes: 3

Views: 449

Answers (1)

Matt Lacey
Matt Lacey

Reputation: 65564

Have you got the Location capability in your WMAppManifest.xml file?

  <Capability Name="ID_CAP_LOCATION"/>

Upvotes: 2

Related Questions