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
5
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

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. automatically

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

react-native-custom-android-webview

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. automatically

Note: Android only Supports all the same props as the default react native webview

Additional Props

In addition to usual React Native WebView props:

PropsTypeNotes & Example
openInternallyArray[string]['google.com', 'facebook.com', 'app.facebook.com']
toolbarColourStringHex code value for the toolbarColour on the Chrome custom tab

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.customwebview.CustomWebViewPackage; to the imports at the top of the file
  • Add new CustomWebViewPackage() 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') 3. Insert the following lines inside the dependencies block in `android/app/build.gradle`: compile project(':react-native-custom-android-webview') ```

Usage

import CustomWebView from 'react-native-custom-android-webview';

<CustomWebView
	...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