Answered How to check Permission for Location Tracking?

  • Sunday, July 08, 2012 11:18 AM
     
     

    In Windows Phone 7 we can look for permission granted status for bing map with something like

                            GeoCoordinateWatcher watcher = new GeoCoordinateWatcher(GeoPositionAccuracy.Default);
                            if (watcher.Permission == GeoPositionPermission.Granted)...

    but given Metro Style app I am not able to find similar. Where is it located in the API hierarchy?

All Replies

  • Monday, July 09, 2012 7:47 AM
     
     Answered

    My bad, that's how you do it,

    Geolocator geolocator = new Geolocator();

    Check geolocator.LocationStatus against Windows.Devices.Geolocation.PositionStatus enum to check if location permission is granted at all...