Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-custom-android-webview

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-custom-android-webview

**Note:** Android only Fork of the react-native webview that adds a couple new functions:

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-91.67%
Maintainers
2
Weekly downloads
 
Created
Source

react-native-custom-android-webview

Note: Android only Fork of the react-native webview that adds a couple new functions:

  1. Ability to pass in an array of hostnames to open in a custom chrome tab
  2. Ability to download PDFs / ZIPs / etc.

Supports all the same props as the default react native webview

Additional Props

PropType & Example
openInternallyArray[String]

Manual installation

Step 1: Install npm package
npm install react-native-custom-android-webview
Step 2: Setup Android Project
  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.ovoenergy.filteringwebview.FilteringWebViewPackage; to the imports at the top of the file
  • Add new RNFilteringWebView() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    	include ‘:react-native-custom-android-webview’
    	project(‘:react-native-custom-android-webview’).projectDir = new File(rootProject.projectDir, ‘../node_modules/react-native-custom-android-webview/android’)
    	```
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-filtering-web-view')
    

Usage

import FilteringWebView from 'PATH/TO/FilteringWebView';

<FilteringWebView
	...standardWebViewProps
	openInternally={['google.com', 'facebook.com', 'app.facebook.com']}
/>;

Note: The openInternally list should be based on host, not domain

License

This project is licensed under the MIT License.

Keywords

FAQs

Package last updated on 13 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc