Android 意图过滤器不重定向

问题描述 投票:0回答:1

android 意图过滤器不启动应用程序

            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data
                android:scheme="http"
                android:host="facix.fr" />
            </intent-filter>

            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data
                android:scheme="https"
                android:host="facix.fr" />
            </intent-filter>

我被重定向到的网址是:https://facix.fr/success

如何更改我的 Android 清单以使我的应用程序上的重定向正常工作?

android flutter android-intent android-manifest
1个回答
0
投票

您可以在元素数据处添加路径

/success
来捕获url

<data
    android:scheme="https"
    android:host="facix.fr"
    android:path="/success" />

要测试您的意图过滤器是否配置正确,您可以使用此命令行。 希望对你有帮助

adb shell am start -W -a android.intent.action.VIEW -d "https://facix.fr/success" your.package.name
© www.soinside.com 2019 - 2024. All rights reserved.