Giter Site home page Giter Site logo

awp-demo's Introduction

Quick Start Guide to Using AWP(Accelerated WebView Project)

AWP is the extension of Android WebView put into a library for use on mobile. It offers an easy-to-use, high performance, standards-compliant, and secure way to use WebView. AWP has support for ALL Android version after Ice Cream Sandwich. This demo gives a brief introduction to using AWP.

Basics

First you will need to put awp_sdk.aar into your project's libs directory, and add below codes to your build.gradle.

    android {

        repositories {
            flatDir {
                dirs 'libs'
            }
        }
    }

    dependencies {
        compile(name: 'awp_sdk', ext: 'aar')
    }

Second you will need to call AwpEnvirnoment.init() to initialize AWP's envirnoment in Application.onCreate().

    class MyApplication extends Application {
        @Override
        public void onCreate() {
            super.onCreate();
            AwpEnvironment.init(this, true);
        }
    }

Now, you can use many fantasy features of AWP like these:

    // Enables debugging of web contents (HTML / CSS / JavaScript)
    AwpEnvironment.getInstance().setAwpDebuggingEnabled(true);
    AwpExtension extension = AwpEnvironment.getInstance().getAwpExtension(mWebView);
    if (extension != null) {
        // Enables SmartImages loading
        extension.getAwpSettings().setSmartImagesEnabled(true);
        // Enables NightMode
        extension.getAwpSettings().setNightModeEnabled(true);
    }
    // Enables AdBlock
    AwpSharedStatics statics = AwpEnvironment.getInstance().getSharedStatics();
    if (statics != null) {
        statics.setAdBlockEnabled(true);
    }

    and so on ...

Fantasy features

  • Support Proxy Override
  • Supports all Android version
  • Nothing need to change, only add single line codes
  • Friendly video playback
  • Ad Block
  • Password save
  • Night Mode

  • Smart Images loading

  • Fast ScrollThumb

  • Error Page

  • Selection Menu

AWP Home

Very welcome to try AWP Demo. If you have any problem or suggestion, please let me know AWP Home.

There are also useful examples for Developing apps with the Android WebView.

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.