سؤال

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