1

Is there a way to register a mimetype-specific plugin in the Android browser? for example, some programs add "application/specificformat" plugin handler, which is seen with navigator.plugins. I've seen the example code, and I tried doing something like the example plugin:

<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>

but it doesn't seem to register with the browser. When I look at navigator.plugins on an Android, it is either empty, or only shows Google Gears Plugin.

Sergey Glotov
  • 20,200
  • 11
  • 84
  • 98
NoBugs
  • 9,310
  • 13
  • 80
  • 146

1 Answers1

0

use webview.getSettings().setPlugInenabled(true) and also setJavaScript in code

you can set mime type using loadData(String data, String mimeType, String encoding)