Skip to content

Geolocator.GetGeopositionAsync ignoring maximumAge and timeout parameters #5661

Closed

Description

@pkar70

Current behavior

GetGeopositionAsync(TimeSpan maximumAge, TimeSpan timeout) is redirected to GetGeopositionAsync(), which leads to app problems. Sometimes these two parameters are really important. E.g. app, that tests if current Geoposition is available to change user interface; hanging here for dozens of seconds is simply impossible; so app uses GetGeopositionAsync with timeout e.g. = 2 seconds. But Uno changes it to infinite timeout (by ignoring timeout parameters).
Also, sometimes it is important to have current, not cached/older Geoposition. Current implementation ignores maximumAge, and can return e.g. fix days old! And we have no ability to workaround this in app code, as next call to GetGeopositionAsync returns same, very old, Geoposition.

Expected behavior

Proper implementation of GetGeopositionAsync(TimeSpan maximumAge, TimeSpan timeout)

How to reproduce it (as minimally and precisely as possible)

Workaround

Environment

Nuget Package:

  • Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia
  • Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
  • Uno.SourceGenerationTasks
  • Uno.UI.RemoteControl / Uno.WinUI.RemoteControl
  • Other: Uno.UWP

Nuget Package Version(s):

Affected platform(s):

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • macOS
  • Skia
    • WPF
    • GTK (Linux)
    • Tizen
  • Windows
  • Build tasks
  • Solution Templates

IDE:

  • Visual Studio 2017 (version: )
  • Visual Studio 2019 (version: )
  • Visual Studio for Mac (version: )
  • Rider Windows (version: )
  • Rider macOS (version: )
  • Visual Studio Code (version: )

Relevant plugins:

  • Resharper (version: )

Anything else we need to know?

Activity

  1. added
    difficulty/tbd
    kind/bug
    triage/untriaged
    on Apr 2, 2021
  2. changed the title [-]Geolocator.GetGeopositionAsync ignored maximumAge and timeout parameters[/-] [+]Geolocator.GetGeopositionAsync ignoring maximumAge and timeout parameters[/+] on Apr 2, 2021
  3. added
    difficulty/medium 🤔
    and removed
    difficulty/tbd
    on Jun 10, 2021
  4. removed
    triage/untriaged
    on Jun 10, 2021
  5. removed their assignment
    on Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

difficulty/medium 🤔kind/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions