Code Monkey home page Code Monkey logo

react-native-x5's Introduction

react-native-x5

X5's WebView for React Native on Android (Interfaces based on ReactNative's WebView Component)

Dependencies

  • 0.0.1: react-native >= 0.33.0, react = 15.3.1

Installation

Install and Link

  • Install from npm
npm i react-native-x5 --save
  • Link native library

You can use react-native-cli:

react-native link react-native-x5

Or rnpm:

rnpm link react-native-x5

Add uses-permission

Add those lines to AndroidManifest.xml in your project.

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

<uses-permission android:name="android.permission.INTERNET" />

<uses-permission android:name="android.permission.READ_PHONE_STATE" />

Usage

Import

import WebView from 'react-native-x5';

Props

Totally same as WebView for react-native

Additional methods:

  • WebView.getX5CoreVersion(callback) static get X5's core version through callback
WebView.getX5CoreVersion(function callback (version) {
    console.log(version); // get `0` if X5 is not installed correctly
});

Detail

腾讯浏览器服务

react-native-x5's People

Contributors

magicismight avatar pingyuanchen avatar

Stargazers

 avatar

Watchers

 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.