Skip to content Skip to sidebar Skip to footer

Fusedlocationproviderclient.requestlocationupdates Not Getting Altitudes

I'm experiencing some strange behavior with our Android app using Fused location Provider Api. In some devices this api is not returning the altitudes I can check it on Moto G 2d

Solution 1:

Since hasAltitude() returns false there are parameters missing to the FusedLocationProvider that would make it possible to provide a confident altitude. This depends largely on the manufacturers setup and devices capabilities which is one of the reasons the Provider exists.

The reason could also be an insufficient GPS-lock or something else but since you could narrow it down to certain devices I would expect that not to be the issue.

You can try (as you already did) other location data sources and check if their results return an altitude, but keep in mind that that might be less consistent. My first try would be the old Location provider.

But there is no way for you to fix the misbehavior of the FusedLocationProvider it is a manufacturer config fail.

Post a Comment for "Fusedlocationproviderclient.requestlocationupdates Not Getting Altitudes"