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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top