开发者

XPCOM support in Android webkit browser?

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: 开发者_如何学Go 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?


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜