質問

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