Reputation: 144
I'm developing an UWP-App for Windows 10 Mobile. I'd like to have the ability to differentiate whether the location-services are completely disabled or the user only denied the access for locations for my specific application.
I'm already getting the GeolocationAccessStatus
by using await Geolocator.RequestAccessAsync()
, but this always results in GeolocationAccessStatus.Denied
, no matter if the user denied the locations for one specific app or if he disabled overall GPS.
Is there a way to differentiate between those 2 cases?
Upvotes: 0
Views: 956
Reputation: 3746
There is no way to get this information. You are already using the appropriate API to get the access status.
You can launch the settings applications on the location page to let the user activate the location both globally and for your application using the following URI: ms-settings:privacy-location
bool result = await Launcher.LaunchUriAsync(new Uri("ms-settings:privacy-location"));
You will found all the available settings URI here
Upvotes: 1