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

huangapple go评论57阅读模式
英文:

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

问题

我在Flutter应用中首先在Android清单文件中实现了Firebase动态链接,最初的清单文件中有以下意图过滤器,应用程序在设备应用程序列表中列出:

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

但是,在添加以下意图过滤器以支持Firebase动态链接后,应用程序不会显示在应用程序列表中:

<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>

我做错了什么吗?

英文:

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 ,

   &lt;intent-filter&gt;
            &lt;action android:name=&quot;android.intent.action.MAIN&quot;/&gt;
            &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot;/&gt;
        &lt;/intent-filter&gt;

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

&lt;intent-filter&gt;

                    &lt;action android:name=&quot;android.intent.action.MAIN&quot;/&gt;
                    &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot;/&gt;
                
                    &lt;action android:name=&quot;android.intent.action.VIEW&quot;/&gt;
                    &lt;category android:name=&quot;android.intent.category.DEFAULT&quot;/&gt;
                    &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot;/&gt;
                    &lt;data
                        android:host=&quot;redbull.page.link&quot;
                        android:scheme=&quot;https&quot;/&gt;

            &lt;/intent-filter&gt;

Am I did something wrong.

答案1

得分: 0

你需要两个意图过滤器,而不是将所有细节嵌套在一个里面。例如:

<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 服务将很快关闭,因此不建议在新项目中使用。详细信息请参考 https://firebase.google.com/support/dynamic-links-faq

英文:

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

   &lt;intent-filter&gt;
        &lt;action android:name=&quot;android.intent.action.MAIN&quot;/&gt;
        &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot;/&gt;
    &lt;/intent-filter&gt;

    &lt;intent-filter&gt;
        &lt;action android:name=&quot;android.intent.action.VIEW&quot;/&gt;
        &lt;category android:name=&quot;android.intent.category.DEFAULT&quot;/&gt;
        &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot;/&gt;
    
        &lt;data
        android:host=&quot;redbull.page.link&quot;
        android:scheme=&quot;https&quot;/&gt;
    &lt;/intent-filter&gt;

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

huangapple
  • 本文由 发表于 2023年7月20日 15:35:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/76727622.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定