stadiamaps / ferrostar

A FOSS navigation SDK built from the ground up for the future
https://stadiamaps.github.io/ferrostar/
Other
91 stars 10 forks source link

[Android] Decide on how to get location updates #21

Closed ianthetechie closed 2 weeks ago

ianthetechie commented 7 months ago

Android is an unmitigated disaster when it comes to location services. We can hack things up with the core Android Location APIs, but will need a better long-term solution.

Here is the shortest summary I can muster to describe the state of Android location services:

I am not currently aware of any open-source projects within the Android developer community which attempts to mitigate the above issues via a common "better fused location client" that has wide adoption. I hope that I'm just missing something, but I've confirmed most of the above with others in the Android community.

If this is indeed the case, we may simply have to push this down a layer and suggest that developers building apps with Ferrostar will have to consider this for their use cases individually. The Organic Maps issue doesn't inspire much confidence as they seem to have implemented workarounds specific to F-Droid.

ianthetechie commented 7 months ago

Minor update: to make matters even more confusing, both the Google Play Services and core Android APIs use an interface of the same name but with a different namespace and definition for the listener ;)

The onLocationChanged method is shared across both interfaces; the Android core one adds several others.

ianthetechie commented 6 months ago

Potential solution available in #28; sounds like they are solving this problem directly.

ianthetechie commented 3 months ago

I think at the end of the day we are going to have to build multiple location providers. We can build first passes of each in separate modules. They have to be separate because not all Android builds include Google play services, and Naurt is a commercial product.

ianthetechie commented 2 months ago

Assigning to you @Archdoog since you're pretty far down the path of passing a location engine into Ramani. High-level integration steps (mirroring that of iOS):