5. Depend on a very accurate time reference, which is provided by atomic clocks at the U.S. Naval Observatory. Each GPS satellite has atomic clocks on board.
6. Each GPS satellite transmits data that indicates its location and the current time.
7. All GPS satellites synchronize operations so that these repeating signals are transmitted at the same instant.
8. The signals, moving at the speed of light, arrive at a GPS receiver at slightly different times because some satellites are farther away than others.
9. The distance to the GPS satellites can be determined by estimating the amount of time it takes for their signals to reach the receiver.
10. When the receiver estimates the distance to at least four GPS satellites, it can calculate its position in three dimensions.
11.
12. GPS Access Create a project Named “UseGps” We need to add some permissions to use GPS and Internet
13. GPS Access 3. Now we need add a location listener, so each time the GPS senses a new location, this callback function will be called from the android system. To do this, we need to add the fallowing code in the onCreate() method:
14. GPS Access 4. We now have to create MyLocationListener class that implements LocationListener and Implement methods for various events: · onLocationChanged ( Location Update ) · onProviderDisabled ( GPS Off ) · onProviderEnabled (GPS On )