So you don't even need Android or iOS for this feature and it's been a thing on certain headsets for a while; both my Sony headphones and buds do this.

It also has an integration with the phone which can add GPS awareness but it works fine without it in my experience.