3

I am using url_launcher: 6.3.0 in my app, without any direct usage of go_router plugin in it. The code I am using to open a link is:

Future<void> _launchUrl(Uri url) async {
    if (!await launchUrl(url = url,
        mode: LaunchMode.externalApplication, webOnlyWindowName: '_blank')) {
      throw Exception('Could not launch $url');
    }
  }

The urls are on static Github pages (no Jekyll, just plain HTML), with a structure like this example https://myuser.github.io/myapp/help.html. The pages are normally accessible via browser.

My AndroidManifest.xml includes this configuration:

<uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />

    <queries>
        <intent>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="https" />
        </intent>
    </queries>

If I try to access to any external url like https://google.com, it works fine but if I try to access to links from Github, like in the link above, it will return the error:

GoException: no routes for location: https://.....

How can I fix that?

1 Answer 1

0

Not sure exactly what link you are trying to open but can you try adding this inside activity tag of manifest.

<meta-data
    android:name="flutter_deeplinking_enabled"
    android:value="false" />
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.