Coder Social home page Coder Social logo

wpe-android's Introduction

WPE Android

logo

WPE WebKit port for Android.

WPEView API

WPEView wraps the WPE WebKit browser engine in a reusable Android library. WPEView serves a similar purpose to Android's built-in WebView and tries to mimick its API aiming to be an easy to use drop-in replacement with extended functionality.

Setting up WPEView in your Android application is fairly simple.

(TODO: package, distribute and document installation)

First, add the WPEView widget to your Activity layout:

<com.wpe.wpeview.WPEView
        android:id="@+id/wpe_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".MainActivity"/>

And next, wire it in your Activity implementation to start using the API, for example, to load an URL:

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_main)

    var browser = findViewById(R.id.wpe_view)
    browser?.loadUrl(INITIAL_URL)
}

To see WPEView in action check the examples folder.

Setting up your environment

python3

The bootstrap script requires python3.

Getting the dependencies

WPE Android depends on a considerable amount of libraries, including libWPE and WPEWebKit. To ease the cross-compilation process we use Cerbero. To set all things up run:

python3 ./scripts/bootstrap.py

This command will fetch the required binaries and place them in the expected location.

If you want to build (and/or modify) the dependencies you can pass the --build option:

python3 ./scripts/bootstrap.py --build

This command will fetch Cerbero, the Android NDK and a bunch of dependencies required to cross-compile WPE Android dependencies. The process takes a significant amount of time.

You can optionally create a debug build of WPEWebKit passing the --debug option to the bootstrap command:

python3 ./scripts/bootstrap.py --build --debug

Finally, the bootstrap option accepts the --arch option to set the target architecture. Currently the only supported architecture is arm64.

Android Studio

Android Studio is required to build and run WPE Android. Once the bootstrap process is done and all the dependencies are cross-compiled and installed, you should be able to open the launcher demo with Android Studio and run it on a real device.

Known issues and limitations

  • The only supported architecture at the moment is arm64.
  • WPE Android does not work with an Android emulator due to EGL emulation issues.
  • The scripts and build have only been tested in Linux.

wpe-android's People

Contributors

ferjm avatar zdobersek avatar mortimergoro avatar philn avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.