-
-
Notifications
You must be signed in to change notification settings - Fork 869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Windows shows app as constantly using the device's location #1394
Comments
Encountering the same issue when building for windows. No permissions were requested, yet windows displays that location is in use. Removing all code connected to permission handler does not help, only helps if you remove |
Found the problem, when the cpp permission_handler plugin class is created during app start, it is getting access to the geolocator even before any app requests for permission are being made. (that's why only adding/removing into pubspec mattered, as it fired up during plugin registration) Commenting it out removes the windows notification that the app uses Location data, but most likely breaks the geolocation. This kind of code should be used after the permission is requested, not before even the main app starts. |
I'm not using any location-related features in my app, yet my Windows app still accesses location data. I tried to replicate this issue in a fresh project with only the boilerplate code and the permission_handler package added to the pubspec, but I encountered the same problem. I'm using latest version: 11.3.1 |
My clients that have installed my app from Microsoft Store get a dialog asking for access to precise location and location history although my app does not use location anywhere and does not explicitly ask for any permissions on Windows. |
Please check the following before submitting a new issue.
Please select affected platform(s)
Steps to reproduce
pubspec.yaml
Related issues: #1289
Additional info:
The package is merely included in
pubspec.yaml
, but isn't actively included anywhere in the code. No location permissions are actively requested, nor needed. Still, as soon as the app is launched, Windows 11 shows the app as currently using the user's location.This also happens when the app is packaged for Windows using
msix
package (following the official Flutter instructions). In the msix config, location capabilities are not even requested. I'm assuming this package might request these permissions anyway, overriding the capabilities specified in the msix config.Expected results
Actual results
Code sample
Code sample
Screenshots or video
Screenshots or video demonstration
Version
11.3.1
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: