Closed CoooWeee closed 1 year ago
What should we use instead of the fused location provider?
I think the issue is that the intervals are not setable.
setWaitForAccurateLocation is by default true but it seems only to work if the intervals are set accordingly.
I changed the code to:
LocationRequest locationRequest = new LocationRequest.Builder(LocationRequest.PRIORITY_HIGH_ACCURACY, 1000)
.setMinUpdateIntervalMillis(500)
.setMinUpdateDistanceMeters(distanceFilter)
.setMaxUpdateDelayMillis(1000) // default
.build();```
Are you saying that setting setWaitForAccurateLocation
to false is not enough?
Are you saying that setting
setWaitForAccurateLocation
to false is not enough?
For my use case it has to be true. I want as high accuracy as I can get but want to fall back on non-gps if not available.
I changed my previous comment to reflect what I'm using at the moment. That fixed it for me (fused location).
Are you saying that non-GPS locations are accurate enough for your purposes? What kind of accuracy readings do you get from them?
Are you saying that non-GPS locations are accurate enough for your purposes? What kind of accuracy readings do you get from them?
No, I'm saying they are not accurate enough but better than nothing.
But if you set setWaitForAccurateLocation
to false, then the locations are too inaccurate for you?
Like, that is worse than nothing?
I noticed that in your watcher configuration, you set stale: true
which implies that you want locations as soon as possible, regardless of their accuracy. I am thinking that the plugin should set setWaitForAccurateLocation
to false when stale
is true.
But with regards to your issue, are you saying that by adding
.setMinUpdateIntervalMillis(500)
.setMaxUpdateDelayMillis(1000)
the initial locations arrive faster?
But if you set
setWaitForAccurateLocation
to false, then the locations are too inaccurate for you?
Why would I set it to false? If I get a more accurate GPS position, I wanna wait for it and use it instead of the non-gps.
I think setWaitForAccurateLocation = false
is only for cases where you don't care much about accuracy but more about having a location as fast as possible.
Sorry, I'm struggling to understand exactly what your priorities are. Please explain your position on the following:
Describe the bug Previously, I used the google location API and got really "good" (fast update rate & okay precision) locations even if without GPS coverage. Now, I am using this plugin with android and it seems as indoors or next to high-rise buildings I do not get often a location, and if the precision is not as good. If I open my old APP or google maps the location immediately improves (precision & update rate).
It seems as if it does not do well with the fused location.
To Reproduce Steps to reproduce the behavior: 1.
Version "@capacitor-community/background-geolocation": "^1.2.7",
Smartphone (please complete the following information): pixel 5
Additional context Add any other context about the problem here.