No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Coviu Android Demo

Coviu Android Demo utilises the WebView enables your app with Coviu services. In this project, Crosswalk is selected as the replacement of the built-in Android WebView. Crosswalk is a web runtime and based on Google Chromium. The built-in Android WebView varies greatly with each Android OS version. Crosswalk as a consistent WebView can work across all Android OS versions.

Next, this guide will show you how to embed Crosswalk in your application on Android Studio (NOTE: this is not Coviu SDK on Android). If you are also interested in Coviu on iOS, please visit our Coviu iOS SDK here. If you intend to be a COVIU API user, you can check our web api as well.

Here are steps for creating a Android Coviu application in Android Studio and embedding Crosswalk.

Create/Open a Android Project

  • From the menu choose "Start a new Android Studio Project" or "Open an existing Android Studio Project"

  • Give your application a name “CoviuDemo”

  • Give it a domain and project location and press “Next”.

  • Select “Phone and Tablet”, Minimum SDK “API 23” and press “Next”.

  • Select “Blank Activity” and press “Next”.

  • Use the defaults for the Activity name and press “Finish”.

Add Crosswalk

Download Crosswalk WebView AAR package crosswalk-23.53.589.4.aar

Import the Crosswalk WebView into the Android project

  • Select File > Project Structure

  • In the top-left of Project Structure window, Click "+" button and Select "Import .JAR/.AAR Package"

  • Select AAR file location and Click "Finish"

  • Crosswalk will be displayed

Your project should now be linked to the Crosswalk webview library.

Configure Project

Coviu requires a few permissions to be enabled on Android. To enable these, modify the AndroidManifest.xml file, adding permission lines before the <application> element. The minimal permissions required for the Crosswalk WebView to render pages are:

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

To prevent orientation changes in the device configuration from interrupting your application. You need to add the following configuration for your activity:


Update the Code

Add an XWalkView to UI layout activity_main.xml like:

        android:layout_height="match_parent" />

Edit the MainActivity class

import android.os.Bundle;
import org.xwalk.core.XWalkView;
import org.xwalk.core.XWalkActivity;
import org.xwalk.core.XWalkPreferences;

public class MainActivity extends XWalkActivity {
    private XWalkView mXWalkView;

    protected void onCreate(Bundle savedInstanceState) {
        XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true);
        mXWalkView = (XWalkView) findViewById(;

    public void onXWalkReady() {


To enable debugging of the web application running in an embedded Crosswalk webview, The key line in the file is:

XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true);

32 Bit Build

You just need to download 32bit Crosswalk AAR library here