SDK Integration > AndroidStudio

In order to use the Tappx classes you must integrate our SDK into your Android Studio Project.

Current SDK version: 3.1.10

Minimum allowed GPS version: 7.0

Integration as dependency


To integrate Tappx in your Android Studio Project you have to modify the build.gradle file (usually located in MyProject/app/build.gradle) and add it to the mavenCentral repository (only if the file is not added yet) and finally add the depency to the Tpps SDK library.

1. MavenCentral Repository:

repositories {
    mavenCentral()
}

2. Tappx SDK and Google Play Services dependencies:

dependencies {
    //Otras dependencias
    implementation 'com.tappx.sdk.android:tappx-sdk:3.+'
    implementation 'com.google.android.gms:play-services-base:12.0.0'
    implementation 'com.google.android.gms:play-services-ads:12.0.0'
}

Example of build.gradle file integrating the SDK (in yellow the added lines). MyProject/app/build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.tappx.samples"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 512
        versionName "5.12"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

repositories {
    mavenCentral()
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.tappx.sdk.android:tappx-sdk:3.+'
    implementation 'com.google.android.gms:play-services-base:12.0.0'
    implementation 'com.google.android.gms:play-services-ads:12.0.0'
}

Integration through .aar file


Alternatively you can integrate the SDK adding the .aar file included in our SDK. Follow this steps:

1. Get the last .aar

You can download it from here.

2. Add the .aar to your Android Studio Project:

The easiest way to import the .aar to your Project is through the Android Studio assistant. You only need to select : File/New/New Module… /Import .JAR-.AAR Package

import_aar.png
File name: This is the path where the .aar has been previously downloaded. Subproject name: This is the module name: tappx-sdk

Finally, you only need to add the dependencies to your app by editing the app/build.gradle file and adding Google Play Services and the module you created recently as a dependency. Example:

...
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation project(':tappx-sdk')
    implementation 'com.google.android.gms:play-services-base:12.0.0'
    implementation 'com.google.android.gms:play-services-ads:12.0.0'
}
...

Tappx © 2020