Replies: 1 comment
-
Would be nice to also have something like |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
To clarify: I'm know how to request permission for coarse/fine location. I'm looking for a way to detect, if the location tracking on the device is enabled or not. ComptonAlvaro requested this as well here and I'm really not sure why this issue was marked as resolved. The offered solution solution (checking it via the permission API if something is possible/available) does not work, as checking the permission status via
await Permissions.CheckStatusAsync<Permissions.LocationWhenInUse>();
returns
PermissionStatus.Granted
even if the devices location tracking is disabled (at least on android).
Checking if the Location Service is enabled by
await Geolocation.GetLocationAsync()
doesn't work either, as it throws an exception:
**Microsoft.Maui.ApplicationModel.FeatureNotEnabledException:** 'Location services are not enabled on device.'
Public API Changes
Intended Use-Case
My App doesn't require location to be on to be used but I want remind users to enable it, as it increases the the functionality of my App. Also I only want to check for the user's location if the Location Service is enabled.
Beta Was this translation helpful? Give feedback.
All reactions