# mobile-rn-webview

> WebView with onShouldStartLoadWithRequest on Android platform

Latest version **0.0.8** (published 2019-06-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install mobile-rn-webview
pnpm add mobile-rn-webview
yarn add mobile-rn-webview
bun add mobile-rn-webview
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2019-06-17 |
| First published | 2018-03-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 39.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | John Wiley & Sons, Inc. |
| Maintainers | dfedorov-at-wiley, schekhlov |
| Keywords | react-native |

## Links

- npm: https://www.npmjs.com/package/mobile-rn-webview
- Repository: https://github.com/WileyLabs/mobile-react-native-libraries
- Homepage: https://github.com/WileyLabs/mobile-react-native-libraries#readme
- Issues: https://github.com/WileyLabs/mobile-react-native-libraries/issues
- npm.io page: https://npm.io/package/mobile-rn-webview

## Recent versions

- 0.0.8 (latest) — 2019-06-17
- 0.0.7 — 2018-04-16
- 0.0.6 — 2018-03-23
- 0.0.5 — 2018-03-14
- 0.0.4 — 2018-03-14
- 0.0.3 — 2018-03-14
- 0.0.2 — 2018-03-13
- 0.0.1 — 2018-03-06

## README

# mobile-rn-webview

WebView with onShouldStartLoadWithRequest method supported on Android platform

## Getting started

`$ npm install mobile-rn-webview --save`

### Mostly automatic installation

`$ react-native link mobile-rn-webview`

### Manual installation


#### iOS

#### Android

1. Open up `android/app/src/main/java/[...]/MainActivity.java`
  - Add `import com.reactlibrary.RNMobileRnWebviewPackage;` to the imports at the top of the file
  - Add `new RNMobileRnWebviewPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
  	```
  	include ':mobile-rn-webview'
  	project(':mobile-rn-webview').projectDir = new File(rootProject.projectDir, 	'../node_modules/mobile-rn-webview/android')
  	```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
  	```
      compile project(':mobile-rn-webview')
  	```

## Usage

```javascript
import WebView from 'mobile-rn-webview';

onShouldStartLoadWithRequest(event) {
    const { url } = event;
    ...
}

...

<WebView style={{flex: 1}}
        source={{html: html}}
        onShouldStartLoadWithRequest={this.onShouldStartLoadWithRequest}
/>
...

```

---
_Source: https://npm.io/package/mobile-rn-webview · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
