Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Location using NetworkProvider

$
0
0

Hello,

I am having problems detecting the device location using NetworkProvider; I followed this recipe http://docs.xamarin.com/recipes/android/os_device_resources/gps/get_current_device_location but fixed the provider to NetworkProvider like this:

    private void InitializeLocationManager()
    {
        _locationManager = (LocationManager)GetSystemService(LocationService);
        _locationProvider = LocationManager.NetworkProvider; 
    }

The problem is OnLocationChanged never fires; I am using a Galaxy S3 for testing and have made sure all location services are on; if I fix GpsProvider instead of NetworkProvider everything Works as expected.

What am I missing?

Any help would be appreciated


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>