Embedded Chromium or Webkit in Android app

前端 未结 6 1186
萌比男神i
萌比男神i 2020-12-12 14:02

For our Android app, we would like to embed our own browser/rendering engine. The most likely candidate for this, is Webkit/Chromium. We are looking for something si

相关标签:
6条回答
  • 2020-12-12 14:12

    pwnall/chromeview · GitHub https://github.com/pwnall/chromeview

    ChormeView works like Android's WebView, but is backed by the latest Chromium code.

    0 讨论(0)
  • 2020-12-12 14:20

    Without WebKit there is a GeckoView. Sure it adds over 20Mb of libs to the project.

    0 讨论(0)
  • 2020-12-12 14:20

    I would consider Chrome custom tabs:

    https://developer.chrome.com/multidevice/android/customtabs

    0 讨论(0)
  • 2020-12-12 14:21

    Nowadays, GeckoView seems an alternative to consider

    0 讨论(0)
  • 2020-12-12 14:25

    You should all check out the Crosswalk project. Sponsored by Intel, and in active development. They pull the Chromium sources and promise to make all new Chromium features available in Crosswalk within 6 weeks.

    Crosswalk is a web runtime for ambitious HTML5 applications. It provides all the features of a modern browser, combined with deep device integration and an API for adding native extensions. It is especially suited to mobile devices.

    Crosswalk supports Android 4.0 and newer, on ARM and Intel architectures.

    Within in one hour of finding this project, I had my Cordova/Phonegap app running on an Android phone with Crosswalk. I'm glad I don't have to adjust my Javascript code to respect the shortcomings of the (pre-4.4) android.webkit.WebView.

    https://crosswalk-project.org

    0 讨论(0)
  • 2020-12-12 14:34

    I tried to use lastest code version of Chromium to build a custom WebView and it's successful.

    I will give my approach but not the source code here right now.

    Eventually, the size of custom WebView library is about 30MB, quite big for some small app. But it's wonderful because can support perfectly from Android 4.0.

    This below is my method:

    • fetch source code of chromium and build web_view_apk (AndroidWebView test shell) follow this instruction https://www.chromium.org/developers/how-tos/android-build-instructions

    • use apktool to decompile the apk file of Aw Shell above. https://ibotpeaches.github.io/Apktool/

    • create your project with res, lib folder as same as decompiled project.

    • Manifest file is located in /src/android_webview/test/src/org/chromium/shell

    • src folder: you find the classes in chromium project source code which are respective the files in smali folder of decompiled project.

    I will update my code later, but you can try my guide now if don't want to wait.

    0 讨论(0)
提交回复
热议问题