Пример #1
0
 public LocationService(Activity mainActivity)
 {
     this.mainActivity = mainActivity;
     locationProvider  = LocationServices.GetFusedLocationProviderClient(Application.Context);
     locationCallback  = new EdisonLocationCallback();
     locationCallback.LocationUpdated += OnLocationUpdated;
 }
Пример #2
0
        public LocationService()
        {
            //            this.mainActivity = mainActivity;
            if (_locationProvider == null)
            {
                _locationProvider = LocationServices.GetFusedLocationProviderClient(Application.Context);
            }
            if (_locationCallback == null)
            {
                _locationCallback = new EdisonLocationCallback();
            }

            _locationCallback.LocationUpdated += OnLocationUpdated;
        }