Exemplo n.º 1
0
        public void EnableLocationSensor(/* final */ Context pContext, /* final */ ILocationListener pLocationListener, /* final */ LocationSensorOptions pLocationSensorOptions)
        {
            this.mLocationListener = pLocationListener;

            /* final */
            LocationManager locationManager = (LocationManager)pContext.GetSystemService(Context.LocationService);
            /* final */
            String locationProvider = locationManager.GetBestProvider(pLocationSensorOptions, pLocationSensorOptions.isEnabledOnly());

            locationManager.RequestLocationUpdates(locationProvider, pLocationSensorOptions.getMinimumTriggerTime(), pLocationSensorOptions.getMinimumTriggerDistance(), this);

            this.OnLocationChanged(locationManager.GetLastKnownLocation(locationProvider));
        }
Exemplo n.º 2
0
 /**
  * @see {@link Engine#enableLocationSensor(Context, ILocationListener, LocationSensorOptions)}
  */
 protected void EnableLocationSensor(ILocationListener pLocationListener, LocationSensorOptions pLocationSensorOptions)
 {
     this.mEngine.EnableLocationSensor(this, pLocationListener, pLocationSensorOptions);
 }