Skip to content

Integration

Anagh Vijayvargia edited this page Jul 9, 2018 · 25 revisions

WibmoPay UPI SDK (only UPI) Integration Steps in Android Studio

For Payment Gateway [WIBMO PAY] (CC/DC/wallets/UPI collect/netbanking) visit here

WibmoPay SDK Maven metadata URI

WibmoPay PG SDK (Wibmo Pay) Maven metadata URI

Step 1. Download Repository

Gradle

Add this to your project level build.gradle file in your studio project

buildscript {
  repositories {
     mavenCentral()
  }
}

Add this to your module level build.gradle file in your studio project

compile 'com.mypoolin:sdk:2.1.12'

Or

Maven

<dependency>
    <groupId>com.mypoolin</groupId>
    <artifactId>sdk</artifactId>
    <version>2.1.12</version>
</dependency>

Step 2. Application Singleton

public class MyApplication extends Application {

    public static int initNetWork;
    public static boolean LOOKING_FOR_PERMISSION = false;

    @Override
    public void onCreate() {
        super.onCreate();
        SharedPreferenceHelper.initSharedPreferenceHelper(this);
        UiUtil.initLogos();
/* This will be Optional
        FirebaseOptions options = new FirebaseOptions.Builder()
                .setApplicationId("<SHARED FIREBASE APPLICATION ID>)
                .setApiKey("<SHARED FIREBASE API KEY>)
                .setDatabaseUrl("<SHARED FIREBASE DB URL>)
                .build();
        FirebaseApp.initializeApp(this, options, "Mypoolin <MERCHNAT-NAME>);*/
    }
}

Requirements

SUPPORTED ANDROID API LEVEL

  • MinSDK = 17
  • Targeted = 26

Cordova Builds (Android)

  • Please follow this guide

Troubleshooting

  • Experiencing issues while using AAPT2 at build with Studio 3.+

If you are using the new gradle version/studio i.e. v4.1+ / 3.0.0 Issue can be resolved by setting the by setting android.enableAapt2=false in your gradle.properties file and restarting the Gradle daemon by running ./gradlew --stop from the command line.

android.content.res.Resources$NotFoundException: File res/drawable/yes_sdk_ic_bank.xml from drawable resource ID #0x7f0800f6. If the resource you are trying to use is a vector resource, you may be referencing it in an unsupported way. See AppCompatDelegate.setCompatVectorFromResourcesEnabled() for more info.

For more info refer: About Android Plugin for Gradle 3.0.0

  • It's possible that SDK and the Host app specify common dependencies, which might result in compile failure on the grounds of class duplication. In such cases specify resolutionStrategy on your App's build.gradle as follows:
configurations.all {
    resolutionStrategy {
        force <path to your version of conflicting library - 1>
        force <path to your version of conflicting library - 2>
        ...
    }
}