Let’s start with your premise:
It doesn’t. GPS needs clear line of sight to at least 3 satellites.
All digital cellular devices have GNSS capabilities because the precise time signals broadcast by the navigation satellite systems (there are about 7 different systems in operation now, GPS (US) , GLONASS (Russia), and Galileo (EU) are the biggest ones. But they all operate on similar principles and frequencies, and a receiver can actually use signals from all of them.
But it requires clear line of sight to the sky.
Modern smartphones have a combination of systems that provide a location feed to the apps. This comes from the GNSS receiver in the cellular modem, WiFi signal triangulation based on signal strength of WiFi beacons that your phone can see, any external GPS receivers, etc, and combines those all into a single location stream that is then available to the applications.
Latest Answers