Android browser plugin

社会主义新天地 提交于 2019-12-05 00:46:08

问题


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 that possibly done?

thanks:)


回答1:


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)




回答2:


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



来源:https://stackoverflow.com/questions/4150954/android-browser-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!