1.0.0 • Published 6 years ago
react-native-gpay-button v1.0.0
react-native-gpay-button
Getting started
$ npm install react-native-gpay-button --save
Mostly automatic installation
$ react-native link react-native-gpay-button
Manual installation
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNGooglePayButtonPackage;to the imports at the top of the file - Add
new RNGooglePayButtonPackage()to the list returned by thegetPackages()method
- Append the following lines to
android/settings.gradle:include ':react-native-gpay-button' project(':react-native-gpay-button').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gpay-button/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:compile project(':react-native-gpay-button')
Usage
import RNGooglePayButton from 'react-native-gpay-button';
...
render() {
return <RNGooglePayButton />
}1.0.0
6 years ago