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); } }
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(); }
/// <inheritdoc/> private async void OnListenerPositionError(object sender, PositionErrorEventArgs e) { await StopListeningAsync(); var error = PositionError; if (error != null) { error(this, e); } }
private void OnListenerPositionError(object sender, PositionErrorEventArgs e) { StopListening(); EventHandler <PositionErrorEventArgs> error = PositionError; if (error != null) { error(this, e); } }
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."); } }
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); }
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"); } }
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); }
private void _geolocator_PositionError(object sender, PositionErrorEventArgs e) { }
/// <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); }
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); }
private void Locator_PositionError(object sender, PositionErrorEventArgs e) { lblError.Text = e.Error.ToString(); }
/// <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); }
void CrossGeolocator_Current_PositionError(object sender, PositionErrorEventArgs e) { Debug.WriteLine("Location error: " + e.Error.ToString()); }
private void PositionError(object sender, PositionErrorEventArgs e) { Console.WriteLine(e.Error); }
private void CrossGeolocator_Current_PositionError(object sender, PositionErrorEventArgs e) { }
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); }
////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(); //// }); }
private void PositionError(object sender, PositionErrorEventArgs e) { ErrorMessage = e.Error.ToString(); }
private void OnError(object sender, PositionErrorEventArgs e) { Debug.WriteLine(e.Error); }
// // 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); }