[英]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.