Android – Install the SDK 2017-05-17T10:18:07+00:00

Android – Install the SDK

The Jetpay Android SDK can be installed from a number of sources.

JCenter, Maven Central and Github are currently supported.

1. Install the SDK Build Tools and Gradle as recommended by Google

2. In your project’s build.gradle file, add jcenter as a repository to your allprojects closure:

allprojects {
   repositories {
      jcenter()
   }
}

3. In your application module’s file, add the Jetpay SDK as a dependency:

dependencies { 
     compile ‘uk.co.jetpay:jetpay:1.0.0’ - TO BE TESTED! 
}

1. Install the SDK Build Tools and Gradle as recommended by Google

2. In your project’s build.gradle file, add Maven Central as a repository to your allprojects closure:

allprojects {
   repositories {
      mavenCentral()
   }
}

3. In your application module’s file, add the Jetpay SDK as a dependency:

dependencies {
compile ‘uk.co.jetpay:jetpay:1.0.0’ - TO BE TESTED!
}

Downloading the SDK

1. Download or Clone the JetPay SDK from https://github.com/JetPaySolutions/jetpay-android-archive

2. This repository contains an Android Archive (.ARR) that can now be incorporated into your Android project

Adding the SDK to your project

From Android Studio:

1. Click File → New Module

2. Click Import .JAR/.ARR Package then click Next

3. Enter the location of the JetPay .AAR file

Update your Build Settings

Complete the following steps to update your build settings:

1. Add the jetpay library to your settings.gradle file:

include ‘:app’, ‘:jetpay’

2. Add the jetpay library as a dependency to your app’s modules build.gradle file:

dependencies {
   compile project(“:jetpay”)
}

3. Synchronise the above changes with your project:

In response to your changes in steps 2 and 3, Android Studio will display a Sync Now button in your workspace window.

Click this button.

You are now ready to go!

Next – Configure the SDK