有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java IntentFilter如何选择哪些数据?

我没有看到其他类似的问题,也许我只是没有正确阅读谷歌文档。我对AndroidManifest相当陌生。xml,今天才开始学习意图过滤器。我的任务是使用Auth0身份验证系统,但它需要多个端点,他们建议将端点添加到AndroidManifest。xml文件作为意图过滤器

Android清单。xml

        <activity 安卓:name="com.auth0.安卓.provider.RedirectActivity"
            tools:node="replace">
            <intent-filter>
                <action 安卓:name="安卓.intent.action.VIEW"/>
                <category 安卓:name="安卓.intent.category.DEFAULT"/>
                <category 安卓:name="安卓.intent.category.BROWSABLE"/>

                <data
                    安卓:host="@string/com_auth0_domain_prod"
                    安卓:pathPrefix="/安卓/com.someCompany/callback"
                    安卓:scheme="https"/>

                <data
                    安卓:host="@string/com_auth0_domain_stg"
                    安卓:pathPrefix="/安卓/com.someCompany/callback"
                    安卓:scheme="https"/>

            </intent-filter>

        </activity>

如何配置意图过滤器以了解要使用的数据?或者我是否需要使用单独的数据创建另一个意图过滤器?我在这里真的很困惑,谷歌文档没有帮助。任何帮助都将不胜感激

对于上下文:Auth0要求将其放在构建中的manifestplaceholder中。gradle但只有当你有1个域/端点时,我们才有2个


共 (0) 个答案