Many phones also have magnetic compasses, so you can get an accurate bearing without needing GPS signals. I would expect significant advances in inertial navigation systems in mobile devices in the coming years.
https://en.wikipedia.org/wiki/Inertial_navigation_system