我只想在我的应用程序中打开url的特定端点,并在浏览器中休息。
我有以下url端点:
/users/sign_in -(应在应用程序中打开)-工作中
/users/password/edit -(应在应用程序中打开)-工作中
/users/ in /accept-(应在浏览器中打开)-此url可打开应用程序,但我不想为此端点打开我的应用程序
下面是我的Manifest.xml
<activity
android:name=".activity.SetNewPasswordActivity"
android:launchMode="singleTask">
<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:host="test.host.com"
android:pathPattern="/users/password/edit"
android:scheme="https" />
</intent-filter>
</activity>
<activity
android:name=".activity.ActivitySplash"
android:screenOrientation="portrait">
<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:host="test.host.com"
android:path="/users/sign_in"
android:scheme="https" />
</intent-filter>
</activity>发布于 2021-01-15 18:34:32
您可以通过使用pathPrefix而不是path来定位特定路径,后者会检查路径是否以上述前缀开头
<data
android:host = "test.host.com"
android:pathPrefix = "/users/sign_in"
android:scheme = "https" />
<data
android:host = "test.host.com"
android:pathPrefix = "/users/password/edit"
android:scheme = "https" />https://stackoverflow.com/questions/65734278
复制相似问题