private void OnListeningError(object sender, PositionErrorEventArgs e)
        {
///			BeginInvokeOnMainThread (() => {
////				ListenStatus.Text = e.Error.ToString();
////			});

            System.Diagnostics.Debug.WriteLine(e.Error.ToString());
        }
        private async void Current_PositionError(object sender, PositionErrorEventArgs e)
        {
            await Navigation.PushPopupAsync(new CommonPopupPage(
                                                new AlertPopupPage(true, "По непонятным причинам GPS не работает на вашем устройстве."),
                                                "Ошибка работы модуля GPS"));

            //DisplayAlert("Ошибка", "По непонятным причинам GPS не работает на вашем устройстве", "Ну ок :(");
        }
        private void OnPositionError(PositionErrorEventArgs e)
        {
            var handler = PositionError;

            if (handler != null)
            {
                handler(this, e);
            }
        }
        private void OnPositionError(PositionErrorEventArgs e)
        {
            var error = PositionError;

            if (error != null)
            {
                error(this, e);
            }
        }
Example #5
0
        private async void PositionError(object sender, PositionErrorEventArgs e)
        {
            TextView infoTextView = FindViewById <TextView>(Resource.Id.infoTextView);

            infoTextView.Text = "Position error occurred, restarting tracking...";

            // Restart tracking after error
            await StopTracking();
            await StartTracking();
        }
Example #6
0
        /// <inheritdoc/>
        private async void OnListenerPositionError(object sender, PositionErrorEventArgs e)
        {
            await StopListeningAsync();

            var error = PositionError;

            if (error != null)
            {
                error(this, e);
            }
        }
Example #7
0
        private void OnListenerPositionError(object sender, PositionErrorEventArgs e)
        {
            StopListening();

            EventHandler <PositionErrorEventArgs> error = PositionError;

            if (error != null)
            {
                error(this, e);
            }
        }
Example #8
0
 private void positionError(object sender, PositionErrorEventArgs e)
 {
     if (App.Current.MainPage != null)
     {
         App.Current.MainPage.DisplayAlert("Erro", "Erro ao pegar posição no GPS.", "Entendi");
     }
     else
     {
         throw new Exception("Erro ao pegar posição no GPS.");
     }
 }
Example #9
0
        private async void OnPositionError(PositionErrorEventArgs e)
        {
            await StopListeningAsync();

            var error = PositionError;

            if (error != null)
            {
                error(this, e);
            }
        }
        private void OnPositionError(PositionErrorEventArgs e)
        {
            StopListening();

            var error = PositionError;

            if (error != null)
            {
                error(this, e);
            }
        }
        private void OnPositionError(object sender, PositionErrorEventArgs e)
        {
            // template to load for showing Toast Notification
            var xmlToastTemplate = "<toast launch=\"app-defined-string\">" + "<visual>" + "<binding template =\"ToastGeneric\">" + "<text>OnPositionError</text>" + "<text>"
                                   + "A position error has occurred: " + e.GeolocationException.Message + "</text>" + "</binding>" + "</visual>" + "</toast>";

            // load the template as XML document
            var xmlDocument = new XmlDocument();

            xmlDocument.LoadXml(xmlToastTemplate);

            var toastNotification = new ToastNotification(xmlDocument);
            var notification      = ToastNotificationManager.CreateToastNotifier();

            notification.Show(toastNotification);
        }
Example #12
0
 private void PositionError(object sender, PositionErrorEventArgs e)
 {
     if (!CrossGeolocator.Current.IsGeolocationAvailable)
     {
         EmergencySms.IsEnabled    = false;
         OptionableSms.IsEnabled   = false;
         CopyCoordinates.IsEnabled = false;
         LatitudeLabel.Text        = "Location is not available, because";
         LongitudeLabel.Text       = "application doesn't have permission to use GPS services";
         LatitudeLabel.TextColor   = Xamarin.Forms.Color.FromHex("#ec407a");
         LongitudeLabel.TextColor  = Xamarin.Forms.Color.FromHex("#ec407a");
     }
     else if (!CrossGeolocator.Current.IsGeolocationEnabled)
     {
         EmergencySms.IsEnabled    = false;
         OptionableSms.IsEnabled   = false;
         CopyCoordinates.IsEnabled = false;
         LatitudeLabel.Text        = "Location is not available, because";
         LongitudeLabel.Text       = "GPS services are off";
         LatitudeLabel.TextColor   = Xamarin.Forms.Color.FromHex("#ec407a");
         LongitudeLabel.TextColor  = Xamarin.Forms.Color.FromHex("#ec407a");
     }
 }
Example #13
0
        private void OnListeningError(object sender, PositionErrorEventArgs e)
        {
            switch (e.Error)
            {
            case GeolocationError.PositionUnavailable:
                CurrentLocation.IsResolved = false;
                CurrentLocation.Status     = XPositionStatus.NotAvailble;
                _fire();
                break;

            case GeolocationError.Unauthorized:
                CurrentLocation.IsResolved = false;
                CurrentLocation.IsEnabled  = false;
                CurrentLocation.Status     = XPositionStatus.Disabled;
                _fire();
                break;

            default:
                CurrentLocation.IsResolved = false;
                CurrentLocation.Status     = XPositionStatus.NotInitialized;
                _fire();
                break;
            }
        }
 private void OnPositionError(PositionErrorEventArgs e) => PositionError?.Invoke(this, e);
 private void OnPositionError(PositionErrorEventArgs e)
 {
     var handler = this.PositionError;
     if (handler != null)
         handler(this, e);
 }
Example #16
0
 private void _geolocator_PositionError(object sender, PositionErrorEventArgs e)
 {
 }
Example #17
0
        /// <summary>
        /// Handles the <see cref="E:PositionError" /> event.
        /// </summary>
        /// <param name="e">The <see cref="PositionErrorEventArgs"/> instance containing the event data.</param>
        private void OnPositionError(PositionErrorEventArgs e)
        {
            StopListening();

            PositionError?.Invoke(this, e);
        }
        async void OnPositionError(PositionErrorEventArgs e)
        {
            await StopListeningAsync();

            PositionError?.Invoke(this, e);
        }
Example #19
0
 private void Locator_PositionError(object sender, PositionErrorEventArgs e)
 {
     locator.StopListening();
 }
    /// <inheritdoc/>
		private void OnListenerPositionError (object sender, PositionErrorEventArgs e)
		{
			StopListening();

			var error = PositionError;
			if (error != null)
				error (this, e);
		}
Example #21
0
 private void Locator_PositionError(object sender, PositionErrorEventArgs e)
 {
     lblError.Text = e.Error.ToString();
 }
Example #22
0
 /// <summary>
 /// If there was an error while getting GPS coordinates
 /// </summary>
 /// <param name="sender">Geolocator</param>
 /// <param name="e">Event arguments for position error</param>
 private void MyLocationPositionError(object sender, PositionErrorEventArgs e)
 {
 }
 private void PositionError(object sender, PositionErrorEventArgs e)
 {
     //  Debug.WriteLine(e.Error);
     //Handle event here for errors
 }
		private void OnPositionError (PositionErrorEventArgs e)
		{
			StopListening();
			
			var error = PositionError;
			if (error != null)
				error (this, e);
		}
Example #25
0
 void CrossGeolocator_Current_PositionError(object sender, PositionErrorEventArgs e)
 {
     Debug.WriteLine("Location error: " + e.Error.ToString());
 }
Example #26
0
 private void PositionError(object sender, PositionErrorEventArgs e)
 {
     Console.WriteLine(e.Error);
 }
Example #27
0
 private void CrossGeolocator_Current_PositionError(object sender, PositionErrorEventArgs e)
 {
 }
Example #28
0
 void CrossGeolocator_Current_PositionError(object sender, PositionErrorEventArgs e)
 {
     labelGPSTrack.Text = "Location error: " + e.Error.ToString();
 }
        /// <inheritdoc/>
        private async void OnListenerPositionError(object sender, PositionErrorEventArgs e)
        {
            await StopListeningAsync();

            PositionError?.Invoke(this, e);
        }
Example #30
0
        ////private void CancelPosition ()
        ////{
        ////    CancellationTokenSource cancel = this.cancelSource;
        ////    if (cancel != null)
        ////        cancel.Cancel();
        ////}

////		partial void ToggleListening (NSObject sender)
////		{
////			Setup();
////
////			if (!this.geolocator.IsListening)
////			{
////				ToggleListeningButton.SetTitle ("Stop listening", UIControlState.Normal);
////
////				this.geolocator.StartListening (minTime: 30000, minDistance: 0, includeHeading: true);
////			}
////			else
////			{
////				ToggleListeningButton.SetTitle ("Start listening", UIControlState.Normal);
////				this.geolocator.StopListening();
////			}
////		}

        private void OnListeningError(object sender, PositionErrorEventArgs e)
        {
////			BeginInvokeOnMainThread (() => {
////				ListenStatus.Text = e.Error.ToString();
////			});
        }
Example #31
0
 private void PositionError(object sender, PositionErrorEventArgs e)
 {
     ErrorMessage = e.Error.ToString();
 }
Example #32
0
 private void OnError(object sender, PositionErrorEventArgs e)
 {
     Debug.WriteLine(e.Error);
 }
Example #33
0
 //
 // Evento: erro na obtençao da posição corrente do usuário via GPS
 //
 private void PositionError(object sender, PositionErrorEventArgs e)
 {
     // Colocar aqui evento para tratamento de erros
 }
 private void OnPositionError(PositionErrorEventArgs e)
 {
   var error = PositionError;
   if (error != null)
     error(this, e);
 }