async void RequestFoundDialogue_RideAccepted(object sender, EventArgs e)
        {
            newTripEventListener = new NewTripEventListener(newRideDetails.RideId, mLastLocation);
            newTripEventListener.Create();

            status = "ACCEPTED";

            //Stop Alert
            if (player != null)
            {
                player.Stop();
                player = null;
            }

            //Dissmiss Dialogue
            if (requestFoundDialogue != null)
            {
                requestFoundDialogue.Dismiss();
                requestFoundDialogue = null;
            }

            homeFragment.CreateTrip(newRideDetails.RiderName);
            mapHelper = new MapFunctionHelper(Resources.GetString(Resource.String.mapkey), homeFragment.mainMap);
            LatLng pickupLatLng = new LatLng(newRideDetails.PickupLat, newRideDetails.PickupLng);

            ShowProgressDialogue();
            string directionJson = await mapHelper.GetDirectionJsonAsync(mLastLatLng, pickupLatLng);

            CloseProgressDialogue();

            mapHelper.DrawTripOnMap(directionJson);
        }
Esempio n. 2
0
        async void RequestFoundDialogue_RideAccepted(object sender, EventArgs e)
        {
            _newTripEventListener = new NewTripEventListener(_newRideDetails.RideId, _mLastLocation);
            _newTripEventListener.Create();

            _status = "ACCEPTED";

            if (_player != null)
            {
                _player.Stop();
                _player = null;
            }

            if (_requestFoundDialogue != null)
            {
                _requestFoundDialogue.Dismiss();
                _requestFoundDialogue = null;
            }

            _homeFragment.CreateTrip(_newRideDetails.RiderName);
            _mapHelper = new MapFunctionHelper(Resources.GetString(Resource.String.mapKey), _homeFragment.MainMap);
            LatLng pickupLatLng = new LatLng(_newRideDetails.PickupLat, _newRideDetails.PickupLng);

            ShowProgressDialogue();
            string directionJson = await _mapHelper.GetDirectionJsonAsync(_mLastLatLng, pickupLatLng);

            CloseProgressDialogue();

            _mapHelper.DrawTripOnMap(directionJson);
        }
Esempio n. 3
0
        private void AvailablityListener_RideTimedOut(object sender, AvailablityListener.TimeoutMessageArgs e)
        {
            if (newRideDialog != null)
            {
                newRideDialog.Dismiss();
                newRideDialog = null;
                player.Stop();
                player = null;
            }

            Toast.MakeText(this, e.Message, ToastLength.Short).Show();
            availablityListener.ReActivate();
        }