Trail-Sense icon indicating copy to clipboard operation
Trail-Sense copied to clipboard

Add approximate location support

Open kylecorry31 opened this issue 4 years ago • 5 comments

This might not be possible when using just the GPS - as far as I can tell the GPS is not available when approximate location is enabled.

This issue is to research how the approximate location can be supported (and where it would make sense to support it - obviously not on the navigation tab).

Given the accuracy of coarse location, it would not be suitable for most use cases within Trail Sense. The only tools where it may be enough are the astronomy and climate tools, so it may not be worth adding support.

It might be that this issue would allow approximate location support: https://github.com/kylecorry31/Trail-Sense/issues/432

kylecorry31 avatar Oct 10 '21 21:10 kylecorry31

How about simply querying the passive location provider? That way, if other apps (actively) queried for accurate location (e.g. a map navigation app) then this'll be available to TS.

Lee-Carre avatar Jan 01 '22 15:01 Lee-Carre

Do you have documentation on that / can clarify what you mean? For reference, TS does not use Google Play Services, so uses the native Location class instead

kylecorry31 avatar Jan 01 '22 17:01 kylecorry31

Do you have documentation on that / can clarify what you mean?

@kylecorry31

TS does not use Google Play Services, so uses the native Location class instead

To my limited knowledge of the internals, I think this shouldn't be a problem. I think it's part of Android (the OS) rather than Google Play Services.

I use other apps which I'm pretty sure are free of Play Services, but which use the passive location provider.

Lee-Carre avatar Jan 01 '22 22:01 Lee-Carre

Thanks - I was not aware of this / thought it was a Google Play Services feature, but from the docs it looks like it isn't. I'll consider this when addressing this issue.

kylecorry31 avatar Jan 01 '22 23:01 kylecorry31

See also android/location-samples.

Lee-Carre avatar Jan 03 '22 21:01 Lee-Carre