androidfluttergoogle-developers-consoleurl-launcherflutter-url-launcher

Flutter: url_launcher not working on play store release


I'm using the url_launcher package in my flutter application. Testing on debug mode works, and so does release mode. However, when I update my app on the play store, it doesn't work. I have also tried different launch modes.

I have the following queries set up in my AndroidManifest.xml

     <queries>
        <intent>
            <action android:name="android.intent.action.PROCESS_TEXT" />
            <data android:mimeType="text/plain" />
        </intent>
        <intent>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="https" />
        </intent>
        <intent>
            <action android:name="android.support.customtabs.action.CustomTabsService" />
        </intent>
    </queries>

I've come across similar issues already and tried almost all of them to no avail. I've also updated my data privacy security form to include that we do collect Installed Apps under App Activity. I've also tried out most of the android package(app) visibily solutions I've come across including adding the QUERY_ALL_PACKAGES app permission in my manifest. What I haven't tried yet is adding the specific packages we want to discover(in this case browsers). I don't want to result to this since android already supports discovery via intents.

I'm now wondering if the problem is with some questionnaire or data privacy form that we filled on the play store.

Edit: I also have firebase crashlytics set up and it doesn't report any Uncaught exceptions or ANRs


Solution

  • Figured it out, this was just a silly developer mistake. I had a web link set up in my AndroidManifest similar to the url I was trying to open from inside the app, so basically every time I try to launch the URL nothing would happen. Opening the URL from outside the app would just launch the app but since the app is already open nothing happens if you're not handling web links/deep links.

    Reason why it didn't work on app downloaded from play store is because I had verified the weblink domain and allowed share credentials. The app therefore came already set up to open such links by default. When installing a debug/release apk you need to set the app as the default to open such links instead of a browser.