Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.
This repository was archived by the owner on May 15, 2024. It is now read-only.

[Bug] Launcher.TryOpenAsync(uri) does nothing #1123

@DeerSteak

Description

@DeerSteak

Description

Launcher.TryOpenAsync(uri) does not try to open a Uri.

Steps to Reproduce

  1. Run attached project in Android or iOS
  2. Click the Open Uri button
  3. Click the Open String button

Expected Behavior

Both buttons should open the default browser and go to Google's website

Actual Behavior

The Open Uri button does nothing. The Open String button navigates to Google's website.

I think that's because the Launcher.shared.cs method for public static Task TryOpenAsync(Uri uri) returns PlatformCanOpenAsync instead of PlatformTryOpenAsync. I'm not set up to contribute but I will try to get myself setup and submit a fix if I can get some time. The issue is pretty straightforward.

Basic Information

  • Version with issue: 1.4.0
  • Last known good version: None known
  • IDE: Visual Studio 2019 for Mac (latest)
  • Platform Target Frameworks:
    • iOS: 13.2 (minimum supported version 8, which is default in VS2019 Mac)
    • Android: API 28 (Android 9)
    • UWP: N/A
  • Android Support Library Version:
  • Nuget Packages: Xamarin Essentials 1.4.0
  • Affected Devices: iOS, Android
    LauncherTryOpenUriExample.zip

Screenshots

Reproduction Link

See attached project

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions