BirjuVachhani/locus-android

Location SingleUpdate sometimes not accurate

Opened this issue · 0 comments

Describe the bug
Locus's single location update is not accurate, sometimes. I need help trying to figure this out.

To Reproduce
Steps to reproduce the behavior:

  1. Create app with Locus
  2. Use the below config:
        Locus.configure {
            enableBackgroundUpdates = true
            forceBackgroundUpdates = true
        }
  1. Ask for location using:
                Locus.getCurrentLocation(context) { result ->
                    result.location?.let {
                        /* Received location update */

Expected behavior
Always get the correct latitude / longitude, give or take 20 meters.

Screenshots
not applicable

Desktop (please complete the following information):

  • OS: Windows
  • Android Studio: Hedgehog | 2023.1.1 Beta 1
  • Locus: 4.1.2

Smartphone (please complete the following information):

  • Device: Samsung Galaxy S21 FE

Additional context
I am trying to understand if I am not using the library correctly, or if this is a limitation of the underlying FusedLocationProvider.
I don't want to conserve battery, I want the best/highest accuracy location the phone can give me. It's only happening 2-3 times per day. Is there any way to force it to provide better location?

Also, I don't know how to debug this. Can you help me check if this is Locus bug or GMS bug?