Question

I wrote an Android GPS application, that requests a location update every 20 seconds using GPS as the provider. I also added a GPS status listener to monitor the available satellites and their SNR.

I noticed that the GPSstatuslistener remains updating the satellites' information all the time (i.e. not every 20 seconds)!

My questions are:

  1. Does this mean that the GPS sensor is always on or does it sleep between every 20 second interval?
  2. The GPS location invocation consists of two stages a) locking, and b) sensing/reporting. In the android does the GPSstatuslistener do the locking and the requestLocationUpdate do the sensing?
Was it helpful?

Solution

  1. If you see gps icon in status bar all the time then it means GPS is on and used, you can do it programmatically by removeUpdates

  2. a)Locking is done automatically by device and Android OS.

    b)Sensing means if you are talking about location information then it is done by requestLocationUpdates(). However information about GPS and its status is done by GPSstatusListener

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top