Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

thanks:)

like image 237
ccot Avatar asked Nov 11 '10 02:11

ccot


2 Answers

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)

like image 124
Stan Kurdziel Avatar answered Oct 27 '22 21:10

Stan Kurdziel


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

like image 21
ccot Avatar answered Oct 27 '22 21:10

ccot