1. Getting the SDK
Gradle Changes
Add Cashfree maven repository
Add to your module's build.gradle file if your gradle version is less than 6.+ or below.
repositories
{
maven
{
url 'https://maven.cashfree.com/release'
}
}
If you are using Gradle version 7.+ in your project then add the maven repository in your settings.gradle file
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
...
maven
{
url 'https://maven.cashfree.com/release'
}
}
}
add the following lines to the dependencies section of the build.gradle file
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'com.cashfree.pg:api:1.0.5'
Permissions
Add the following permissions to your module's AndroidManifest.xml file:
<uses-permission android:name="android.permission.INTERNET" />
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="upi" android:host="pay"/>
</intent>
<package android:name="com.android.chrome" />
</queries>
Updated 21 days ago
Did this page help you?