How can I call Android JavaScript functions in WebView?

Which files should I use to use Chromium as a webview for Android?

  • There's this android_webview directory in the source code of Chromium:http://src.chromium.org/viewvc/chrome/trunk/src/android_webview/ For speed, I want to use it instead of the default webview in Android. I built Chromium for Android (http://code.google.com/p/chromium/wiki/ AndroidBuildInstructions) and got this out/Release directory: https://gist.github.com/4544582 Which files should I copy to my Android app? I think chromium_android_webview_java.jar and libwebviewchromium.so (there are 2 .so files of this name) are not enough.

  • Answer:

    It isn't as simple as copying a few .so files into your application resource directory. You have built the chromium contentshell for android. This incorporates the chrome browser and rendering and engine but not all the features (autofill etc are not included). Replacing the default webview with an embedded version of content shell will take a considerable amount of work, you will need to delve into the android source code. Check out https://github.com/pwnall/chromeview , a proof-of-concept project, that allows you to use a custom webview backed by chromium source (Awcontent not content shell). It is quite buggy and not ready for use in production. If you do end up embedding content shell, let me know !

Sahaj Sawhney at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.