【发布时间】:2017-08-22 13:06:08
【问题描述】:
如何为带有重定向的 url 设置意图过滤器?
此过滤器不适用于上述 URL。
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="http"/>
<data android:scheme="https"/>
<data android:host="foosubdomain.foodomain.com"/>
</intent-filter>
此过滤器适用于上述 URL。但这不是所需要的。我需要在重定向部分按主机过滤 foosubdomain.foodomain.com
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="http"/>
<data android:scheme="https"/>
<data android:host="mail.mailserverXXX.com"/>
</intent-filter>
【问题讨论】:
标签: android android-intent intentfilter