Hi Derek, Be sure that you also listen for Geolocator.PositionError, add a handler for that and make sure you're not getting any errors. You're correct that GetPositionAsync is for one-off requests.
API Docs are available at http://betaapi.xamarin.com Check the docs for StartListening here: http://betaapi.xamarin.com/?link=M%3aXamarin.Geolocation.Geolocator.StartListening(System.Int32%2cSystem.Double) On Wed, Jan 4, 2012 at 11:22 AM, devbuzz <[email protected]> wrote: > A quick question about the geolocation API - I couldn't find any docs :) > > I'm grabbing GPS positions in a service using this code: > > geolocator = new Geolocator (this) { DesiredAccuracy = 50 }; > > if (!geolocator.IsGeolocationEnabled) > return; > > geolocator.PositionChanged += gps_LocationChanged; > > if (!geolocator.IsListening) > { > geolocator.StartListening(minTime: GPSTimerInterval_ms, minDistance: 0); > } > > The problem is that gps_LocationChanged never runs? > > Am I correct in assuming that if StartListening has been run then as soon > as geolocator gets a fix gps_LocationChanged will run? > > Just want to make sure I'm using it correctly - in the sample I see a call > to GetPositionAsync - but that looks like it's for an immediate check? > > -- > View this message in context: > http://mono-for-android.1047100.n5.nabble.com/Introducing-the-Xamarin-Mobile-API-Preview-tp5015136p5120073.html > Sent from the Mono for Android mailing list archive at Nabble.com. > _______________________________________________ > Monodroid mailing list > [email protected] > > UNSUBSCRIBE INFORMATION: > http://lists.ximian.com/mailman/listinfo/monodroid >
_______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
