0

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?

user896692
  • 2,351
  • 7
  • 36
  • 57

1 Answers1

1

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.

AlexWien
  • 28,470
  • 6
  • 53
  • 83
  • Thanks, I´ve solved it at this moment. Do you know how I get the real over sea value from the altitude? – user896692 Jun 03 '13 at 17:15
  • you cannot get the mean sea level, you get the altitude over ellipsoid. This is a very complicated calculation. There is a Nasa Software with src available. I recnetly searche for it, but I have never used it. But this might be worth an own question here at So. – AlexWien Jun 03 '13 at 17:21