【发布时间】:2021-09-18 23:26:57
【问题描述】:
我有两个用于电子邮件确认和密码重置的链接,因为电子邮件确认链接没有pathPrefix,它与密码重置链接冲突。
我使用sspPattern 根据它们之间的差异对它们进行分类,但密码链接会触发这两种意图。链接如下。
<activity
android:name=".ui.deepLink.ResetPassword"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter android:label="@string/my_website">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="mywebsite.de"
android:pathPrefix="/resetpassword"
android:sspPattern="/resetpassword?userId=.*&c=.*"
android:scheme="https" />
</intent-filter>
</activity>
<activity
android:name=".ui.deepLink.EmailConfirmation"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter android:label="@string/my_website">
<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="mywebsite.de"
android:sspPattern="//mywebsite.de/?userId=.*&code=.*"/>
</intent-filter>
</activity>
电子邮件确认链接:https://mywebsite.de/resetpassword?UserId=35541&c=B66ZcFVwXfGhyHZQ==
【问题讨论】:
标签: android android-intent intentfilter