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();
}