1

有没有办法在 Android 浏览器中注册特定于 mimetype 的插件?例如,一些程序添加了“应用程序/特定格式”插件处理程序,可以在 navigator.plugins 中看到。我已经看过示例代码,并尝试执行示例插件之类的操作:

<service android:name=".SamplePlugin">
    <intent-filter>
        <action android:name="android.webkit.PLUGIN" />
        <data android:mimeType="application/applicationmimetype" android:scheme="http" />
    </intent-filter>
    <meta-data android:name="type" android:value="native" />            
</service>

但它似乎没有在浏览器中注册。当我在 Android 上查看 navigator.plugins 时,它要么是空的,要么只显示 Google Gears 插件。

4

1 回答 1

0

在代码中使用 webview.getSettings().setPlugInenabled(true) 和 setJavaScript

您可以使用 loadData(String data, String mimeType, String encoding) 设置 mime 类型

于 2012-01-20T14:09:57.697 回答