【发布时间】:2015-04-09 11:15:24
【问题描述】:
我正在尝试使用http 和https 方案使我的活动句柄网址采用mydomain.com 或www.mydomain.com 的形式。目前,我的活动的 IntentFilter 属性如下所示:
[IntentFilter(
new[] { Intent.ActionView },
Categories = new[] { Intent.CategoryDefault, Intent.CategoryBrowsable },
DataHost = "mydomain.com",
DataScheme = "http"
)]
这会在清单中生成,并且似乎不适用于任何所需的 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:host="mydomain.com" android:scheme="http" />
</intent-filter>
如何更改此属性,以便我的活动能够处理 http(s)://(www.)mydomain.com 形式的所有 url?
【问题讨论】:
标签: android xamarin xamarin.android android-manifest intentfilter