简体   繁体   English

如何在我的Android应用程序上深层链接到特定页面

[英]How do i deeplink to a specific page on my Android App

I'm trying to deeplink to a specific page on my Android app. 我正在尝试深链接到我的Android应用程序上的特定页面。

This is what i've tried: 这是我尝试过的:

DeepLinkingTest://?screen=ResetResponse

but it just opens the app home page 但它只是打开应用程序主页

Update: 更新:

I've just tried: 我刚刚尝试过:

<activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <data android:scheme="deeplinkingtest"
                      android:host="resetresponse"/>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

but still opening on home page 但仍在首页上打开

Add intent filter for the activity that you want to open via deep link to its definition in the AndroidManifest.xml . 为您要通过其在AndroidManifest.xml定义的深层链接打开的活动添加意图过滤器。 Here is an example: 这是一个例子:

<activity
    android:name="com.example.android.GizmosActivity"
    android:label="@string/title_gizmos" >
    <intent-filter android:label="@string/filter_title_viewgizmos">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <!-- Accepts URIs that begin with "http://www.example.com/gizmos” -->
        <data android:scheme="http"
              android:host="www.example.com"
              android:pathPrefix="/gizmos" />
        <!-- note that the leading "/" is required for pathPrefix-->
        <!-- Accepts URIs that begin with "example://gizmos” -->
        <data android:scheme="example"
              android:host="gizmos" />

    </intent-filter>
</activity>

In this example, GizmosActivity is the activity you want to start via deep link. 在此示例中, GizmosActivity是您要通过深层链接启动的活动。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Cordova Android应用程序中深度链接到特定页面? - How to deeplink to specific page in cordova android app? 如何在 Android 中深度链接到亚马逊购物应用程序的产品页面? - How to deeplink to product page for Amazon Shopping app in Android? 如何在我的应用程序中使用DeepLink - Android - How to DeepLink in my application - Android 如何在 android 中使用深层链接启动应用程序 - How to launch an app using a deeplink in android 如何在Android上的应用程序中设置DeepLink - How to set DeepLink in my application on Android 安装 angular cordova 应用程序后重定向到特定页面(Deeplink) - Redirect to specific page(Deeplink) after installing angular cordova app Uber deeplink Android应用程序 - Uber deeplink Android app 从Deeplink启动时,我可以使用代码退出android应用吗? - Can I exit my android app with code when it is started from a deeplink? 如何为我的Android应用程序更新SQL数据库中特定按钮的详细信息? - How do I update the details of a specific button in my SQLdatabase for my android app? 阻止移动网站打开我的应用程序 android 深度链接 - Google Chrome - Block mobile website to open my app android deeplink - Google Chrome
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM