开发者

Android browser plugin

i found sample plugin in android source code. let's say i can write a plugin using the sample, how would i get my emulator to run the plugin that i wrote? Do i need to recompile the source code? if yes, how is t开发者_C百科hat possibly done?

thanks:)


The BrowserPlugin sample is an example of how to write an actual browser plugin. For example Flash player

It is focused on the plugin being written in C/C++ native code and then invoked when the Android user navigates to a page with the matching tag.

In my experience and observation of Android application development this is not a recommended way to develop a local Android application (ex: games, communication programs, etc)

In response to Chadic: it's not necessary to recompile the emulator to deploy a browser plugin. A plugin like flash can be downloaded from the google marketplace, and similarly, deploying a custom built plugin involves pushing an apk and shared object file to the phone/emulator. (SampleBrowserPlugin.apk and libsampleplugin.so in the case of the BrowserSample project)


For anyone struggling with this situation, i found a way around:

include a "webview" inside your application and create a webclient for it.

this imports the native browser inside your app. So i added manually a url bar and go button and some other stuff for my application, which makes it look like if it was a plugin for the native browser! this is the best solution so far, until google provides an easy feasible way to develop plugins for the native browser

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜