Home / Android / SDK Integration - Android Studio / Integration through .aar file

SDK Integration - Android Studio

Integration through .aar file

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

1. Get the last .aar

You can download it 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

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

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

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 project(':tappx-sdk-omsdk')
implementation 'com.google.android.gms:play-services-ads:19.4.0'
implementation 'com.android.installreferrer:installreferrer:2.2'
}
...

3. Activate geolocation (Recommended):

Setting the call to this function to "TRUE" will trigger custom ad search by geolocation. This it can cause revenue to increase by having more focused ads for the user. It must be placed in some main function know that it will be executed.

Tappx.setCollectLocationEnabled(context,true);