Reputation:
Does the Android WebKit supports the XPCOM framework or NPRuntime API`s as like Firefox? How to implement JavaScript in the Android WebKit plug-in?
Update: I am writing a media player plug-in for the Android WebKit browser and my plug-in needs to get the command from the web page through JavaScript (some actions like play/pause/stop/resize are issued as JavaScript commands from the browser). My plug-in is written in native C code. Are there any examples or sample plug-in available for JavaScript communication?
Upvotes: 1
Views: 2250
Reputation: 792
The android browser supported NPAPI all the time, the mechanism changed in 2.1 though, now it looks for APKs with the intent filter "android.webkit.PLUGIN", so a plugin needs to be packaged separately.
Previously setting the plugin path on the WebView and compiling the plugin using the NDK did the trick.
Hope this helps, you will find a lot of info when googling for NPAPI and WebView or NPAPI and android.
Upvotes: 1
Reputation: 29745
Android's WebKit doesn't support XPCOM, nor does it support NPAPI and npruntime. Not sure how you're planning to write a browser plugin, but it's not going to be possible with the Android SDK.
Upvotes: 0
Reputation: 111555
WebKit doesn't support XPCOM, as WebKit is entirely separate from the Mozilla stack.
When you say you want to "implement Javascript", what do you mean?
The built-in Android browser already supports the execution of Javascript.
Upvotes: 2