Exemplo n.º 1
0
 void OnCurLocChanged(object sender, DynProp <LocInfo> .EvtArgs e)
 {
     if (_first)
     {
         FetchMatchingBooking();
     }
     // TODO: Maintain drivers state. If he/she has kept app open without picking up booking
     // and is driving around, we should update the matched bookings beyond certain distance threshold
 }
Exemplo n.º 2
0
 void OnCurLocChanged(object sender, DynProp <LocInfo> .EvtArgs e)
 {
     if ((LastLoc != null) && (              // if not the first update and
             !HasAccuracyImproved(e.NewValue.Accuracy) ||
             CommonUtils.GeoDistance(LastLoc, e.NewValue.Loc) < VICINITY_THRESHOLD))
     {
         return;
     }
     LastLoc       = e.NewValue.Loc;
     _lastAccuracy = e.NewValue.Accuracy ?? int.MaxValue;
 }
Exemplo n.º 3
0
        private AppCommon(string googleApiKeyNative, string googleApiKeyWeb, ILocationProvider locationProvider)
        {
            Inst               = this;
            IsLoggedIn         = false;
            GoogleApiKeyNative = googleApiKeyNative;
            GoogleApiKeyWeb    = googleApiKeyWeb;

            Log         = new Logger();
            IsPassenger = new DynProp <bool> (true);
            LoadAppData();
            PlacesProvider       = new PlacesProvider();
            DirectionsProvider   = new DirectionsProvider();
            LocationProvider     = locationProvider;
            NearestPointProvider = new NearestPointProvider();

            IsPassenger.Value = AppData.IsLastUserPassenger;
        }