Closed ianthetechie closed 2 weeks 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.
Potential solution available in #28; sounds like they are solving this problem directly.
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.
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):
StaticLocationEngine
(better names welcome :P just rolling with that since it's what I have from iOS) that implements LocationEngine
. This can live in the NavigationMapView
to update a local instance of the StaticLocationEngine
, which drives updates (most of the time; via tracking with heading) rather than direct manipulation via cameraPosition
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.