Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ yarn add react-native-upi-payment
### Android
#### Automatic Installation
```
react-native run link
react-native link
```

#### Manual Installation
Expand All @@ -31,25 +31,28 @@ project(':react-native-upi-payment').projectDir = new File(rootProject.projectDi

```

Open `android/build.gradle` add the following in the dependencies section
Open `android/app/build.gradle` add the following in the dependencies section
```
dependencies {
compile project(':react-native-upi-payment')
implementation project(':react-native-upi-payment')
}
```

Open `MainApplication.java`
Open `android/app/src/main/java/com/<app-name>/MainApplication.java`
```java
// Other imports
import com.upi.payment.UpiPaymentPackage;

// Do this when the package is not auto added
// Add this in the Main Application Class
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
//... Other packages
new UpiPaymentPackage() // <- Add this line
);
// ...
List<Reactpackage> packages = new PackageList(this).getPackages();

packages.add(new UpiPaymentPackage()) // <- Add this line

return packages;
}
```

Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ android {
}

dependencies {
compile "com.facebook.react:react-native:+" // From node_modules
compile 'com.google.code.gson:gson:2.8.0'
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'com.google.code.gson:gson:2.8.0'
}