How to get information about the satellites from android?
<p><br>
I am trying to get the satellite information from the android and wrote this following code which is not giving any results, could any one point out why is it so? <br></p>

<pre><code>public void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    setContentView(R.layout.gps);

    final LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);

    GpsStatus gpsStatus = locationManager.getGpsStatus(null);
    if(gpsStatus != null)
    {
         Iterable&lt;GpsSatellite&gt;satellites = gpsStatus.getSatellites();
         Iterator&lt;GpsSatellite&gt;sat = satellites.iterator();
         int i=0;
         while (sat.hasNext()) {
             GpsSatellite satellite = sat.next();


             strGpsStats+= (i++) + ": " + satellite.getPrn() + "," + satellite.usedInFix() + "," + satellite.getSnr() + "," + satellite.getAzimuth() + "," + satellite.getElevation()+ "\n\n";
         }
     }
     TextView tv = (TextView)(findViewById(R.id.Gpsinfo));
     tv.setText(strGpsStats);
}
</code></pre>

<p>thanks<br>
Nohsib</p>
