1

I'm really new to android studio, and I'm trying to implement a "getAltitude()" although everything online is really outdated (8+ years old). How do I use getAltitude? Also, sorry if this is vague, I just don't know where to start.

Edit: Turns out you just need to have a location variable then do .getAltitude(), kind of like this:

@Override
public void onLocationChanged(Location location) {
    altitude = location.getAltitude();
}
Phantom37
  • 21
  • 8
  • Does this answer your question? [How does getAltitude() of Android GPS Location Works](https://stackoverflow.com/questions/2791927/how-does-getaltitude-of-android-gps-location-works) – Abhishek Dutt Jul 07 '22 at 03:09

0 Answers0