gmrnx5

1.0.0 • Public • Published

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

腾讯浏览器服务

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.00latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.00

Package Sidebar

Install

npm i gmrnx5

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

362 kB

Total Files

21

Last publish

Collaborators

  • gmfe