简体   繁体   中英

Enable access to location Windows 8 app (Geolocator)

I'm using Geolocator. So I have async method OnPositionChanged() and everything should be good. But I have problem with getting access to location. If I use Windows 8 Sample Geolocation App everything works ok. I have Message that app use location I give access and it works, but in my application this message not appears and status of Geolocator is Disabled. How can I give access to location to my app programmatically?

Similarly to Windows Phone, using a location requires you as a developer, to explicitly declare that your application will require access to the location API. This is set in the application manifest. In a Solution explorer, look for Package.appmanifest item and double click on it to open – the manifest properties window will open.

Click on the Capabilities tab. Check Location capability (just under it). 地理位置

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM