Question

What I want is, that my app shows the user the altitude on his current location.

I tried that with the LocationManager, got longitude and latitude an now I tried with .getAltitude() to get the value. It always shows 0. hasAltitude() returns me false.

So what is the right way to get the altitude to my current location for every mobile phone with a GPS sensor?

Was it helpful?

Solution

Set your software to explictly only use GPS location provider.

Further: leave your desk and go out, on emulator you will not get an altitude value.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top