意图过滤器似乎不起作用

时间:2015-10-01 13:03:43

标签: android html intentfilter

我想知道是否有必要使用intentfilter中的主机。如果是这样,主机是否需要实际存在。

这是我尝试过的:

<intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data
                android:host="hi10.android.be"
                android:pathPrefix="/eidsignature/"
                android:scheme="http" />
            <data
                android:host="www.hi10.android.be"
                android:pathPrefix="/eidsignature/"
                android:scheme="http" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

然后我在我的html中添加一个链接:

<a href="http://hi10.android.be/eidsignature/">CLICK HERE</a>

这就是事情。 hi10.android.be不存在。所以我想知道这是否需要成为激活我的应用程序的有效主机。如果是这样,我应该使用哪个主机,因为该应用程序仍在开发中,并且尚未托管在任何地方。

编辑:这不是btw

1 个答案:

答案 0 :(得分:0)

不,它不必是使用意图过滤器的有效主机。只要主机的意图过滤器中的字符串匹配主机的url中的字符串。你很高兴。

相关问题