我试图捕捉到当有人在mms浏览器中单击指向网页的超链接时激发的意图。我在舱单上有这个:

        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:scheme="http" />
        </intent-filter>

但是,当我点击http://www.ibm.com时,它只会启动浏览器。我也一样
$am start-一个android.intent.action.view-dhttp://www.ibm.com
在亚行的壳里。你知道我做错了什么吗?
非常感谢,
C

最佳答案

Browser's manifest中复制意图过滤器行,它将工作:

        <!-- For these schemes were not particular MIME type has been
             supplied, we are a good candidate. -->
        <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:scheme="about" />
            <data android:scheme="javascript" />
        </intent-filter>
        <!--  For these schemes where any of these particular MIME types
              have been supplied, we are a good candidate. -->
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.BROWSABLE" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:scheme="http" />
            <data android:scheme="https" />
            <data android:scheme="inline" />
            <data android:mimeType="text/html"/>
            <data android:mimeType="text/plain"/>
            <data android:mimeType="application/xhtml+xml"/>
            <data android:mimeType="application/vnd.wap.xhtml+xml"/>
        </intent-filter>

10-07 19:25