Skip to content
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

Support for Coarse/Approximate Location Only #93

Open
Sypers opened this issue Jan 1, 2024 · 2 comments
Open

Support for Coarse/Approximate Location Only #93

Sypers opened this issue Jan 1, 2024 · 2 comments

Comments

@Sypers
Copy link

Sypers commented Jan 1, 2024

Describe the bug
I have an app that can work with coarse/approximate location. when the user chooses to use approximate location from the permission request dialog the Locus location request seem to detect that the permission has not been granted. I think its because Locus uses fine/percise location only.

To Reproduce
Steps to reproduce the behavior:

  1. Request location and allow approximate location only
  2. Invoke Locus for a location request
  3. LocusRequest produces an error of permission denied and no location data is provided.

Expected behavior
Proceed to provide the location according to the restrictions of approximate location use.

Smartphone (please complete the following information):

  • Device: Xiaomi 11T
  • OS: Android 13
  • Version 5.0.0
@BirjuVachhani
Copy link
Owner

Hi @Sypers, Locus does support all the configuration you can do with LocationRequest:

Locus.configure {
    request {
        // Set priority, interval, maxTime, etc.
    }
}

Does this answer your query? If not, then let me know how you would it manually.

@Sypers
Copy link
Author

Sypers commented Jan 10, 2024

The problem is if the user only grants the permission for approximate location the location throws a permission not granted while the expected behavior should be that the location request retrieves the location info even if it's inaccurate. I took a quick look at the source code and it seems that the precise location permission is required for the request to be successful. I would suggest a variable for the Locus configuration that does not force precise location permission to be granted and suffice with approximate location.

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

No branches or pull requests

2 participants