androidlocationlocation-provideraltitude

Is there any idea to get altitude data quickly while using LocationClient for Android?


I have been using LocationManager for Android to record location data, and the new 'LocationClient' API has come, so I tried it.

The result looked good. It gets location data very quickly, but I found that the Android Fused Location provider(LocationClient) doesn't provide altitude data in almost all cases, even though I tracked quite a long time.

So, the question is, 'Is there any nice way or idea to get altitude data while using LocationClient?', or should I just stay using GPS provider which is not fast enough?


Solution

  • AFAIK, the only provider today in standard Android that can give you altitude is GPS. AFAIK, both WiFi hotspot proximity and cell tower triangulation presume that you are on the surface of the Earth, or at least within a relatively narrow band of the surface, treating the local area as a flat plane.

    LocationClient and the "fused" location provider is designed to blend all of those approaches to get you more accurate latitude/longitude more quickly. However, if my AFAIKs are correct, it cannot get altitude any faster than GPS. And, depending on how it handles things internally, it may put more emphasis on the non-GPS providers, and therefore give you altitude less frequently. Since the Play Services stuff is closed-source, we have no good way to know.

    or should I just stay using GPS provider which is not fast enough.

    The speed of obtaining GPS fixes is tied to environment (e.g., indoors/outdoors) and to device GPS receiver quality.