androidflutterfirebasefirebase-dynamic-links

After adding intent filers for firebase dynamic link support app does not listed in app list in android devices


I'm implemented firebase dynamic links in flutter app at first in android manifiest file has intent filter like below & app is listed in device app list ,

   <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>

but after adding below intent filters to support firebase dynamic links app not showing in app list

<intent-filter>

                    <action android:name="android.intent.action.MAIN"/>
                    <category android:name="android.intent.category.LAUNCHER"/>
                
                    <action android:name="android.intent.action.VIEW"/>
                    <category android:name="android.intent.category.DEFAULT"/>
                    <category android:name="android.intent.category.BROWSABLE"/>
                    <data
                        android:host="redbull.page.link"
                        android:scheme="https"/>

            </intent-filter>

Am I did something wrong.


Solution

  • You need two intent filters rather than nesting both details in one. So for example:

       <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    
        <intent-filter>
            <action android:name="android.intent.action.VIEW"/>
            <category android:name="android.intent.category.DEFAULT"/>
            <category android:name="android.intent.category.BROWSABLE"/>
        
            <data
            android:host="redbull.page.link"
            android:scheme="https"/>
        </intent-filter>
    

    FYI Dynamic Links service will shut down soon so using in new projects is not advised https://firebase.google.com/support/dynamic-links-faq