Skip to content

Fix "location services disabled" error on Wear OS #1689

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

muratsevim
Copy link

getCurrentPosition() was returning "location services disabled" error on Wear OS even though location was actually enabled. Handling this error skips the location setting check and starts fetching the location.

List at least one fixed issue.
Fixes #1197 for getCurrentPosition(). I haven't tested Wear OS support for all APIs.

Pre-launch Checklist

  • I made sure the project builds.
  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is does not need version changes.
  • I updated CHANGELOG.md to add a description of the change.
  • I updated/added relevant documentation (doc comments with ///).
  • I rebased onto main.
  • I added new tests to check the change I am making, or this PR does not need tests.
  • I made sure all existing and new tests are passing.
  • I ran dart format . and committed any changes.
  • I ran flutter analyze and fixed any errors.

@masus04
Copy link

masus04 commented May 16, 2025

When I install this commit using the following dependency block:

  geolocator: # ^14.0.0
    git:
      url: https://github.com/Baseflow/flutter-geolocator.git
      ref: 725a26e5ad71bda685f208c5ebf615a975af9ffb
      path: geolocator

I still receive an error when running on the Android Studio Emulator:

LocationServiceDisabledException: The location service on the device is disabled.

I checked the following:

  • Permission is required in the Manifest
  • Permission is granted by the User
  • Location is enabled on the device

Can you tell me how you got it to work on your side?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🚀 WearOS support
2 participants