Exemplo n.º 1
0
 public GpsTrackerAndroid()
 {
     StatusChanged?.Invoke(this, new LocatorStatusChangedEventArgs(WrappedPositionStatus.Initializing));
     _locationServiceConnection = new LocationServiceConnection(null);
     _locationServiceConnection.ServiceConnected += (object sender, ServiceConnectedEventArgs e) =>
     {
         StatusChanged?.Invoke(this, new LocatorStatusChangedEventArgs(WrappedPositionStatus.Ready));
         LocationServiceBinder binder = e.Binder as LocationServiceBinder;
         if (binder != null)
         {
             _service = binder.Service;
         }
         _service.LocationChanged += OnLocationChanged;
         _service.StatusChanged += OnStatusChanged;
         Interval = _service.Interval;
     };
 }
Exemplo n.º 2
0
 public LocationServiceBinder(LocationService service)
 {
     Service = service;
 }