Android Xamarin C#: Get the number of satellites used for GPS location
<p>I want to find the number of satellites that my gps is using but no matter what I do it always returns 0.
I have googled and read a lot about people with the same or similar issue but none of the fixes seemed to work for me. It would still only return 0.</p>

<p>Here is my function:</p>

<pre><code>    private static int TotalSatillites(Android.Locations.LocationManager locationProviders)
    {
        var gpsStatus = locationProviders.GetGpsStatus(null);
        var satilliteIterator = gpsStatus.Satellites.Iterator();

        var totalSatillies = 0;
        while (satilliteIterator.HasNext)
        {
            var satillite = (GpsSatellite)satilliteIterator.Next();
            if (satillite.UsedInFix())
            {
                totalSatillies++;
            }
        }

        return totalSatillies;
    }
</code></pre>

<p>AFAIK This should work but doesn't appear to and I cannot figure out why.
I have also tried using locations Extras like so:</p>

<pre><code>var sats = location.Extras.GetInt("satellites");
</code></pre>

<p>But this also only ever comes back 0.</p>

<p>Note: I am testing this entirely in the android emulator and I am setting the location via telnet with the command:</p>

<pre><code>geo fix 9 9 9 9
</code></pre>

<p>Which should set lat and long to 9, altitude to 9 and satellites to 9. This (should be?) working as my code gets the 9's for lat long and alt first and then tries to get the satellites numbers.</p>