📱Custom Adapter Integration

This document will guide you through an easy-to-follow process of adding Adster.Tech as your third-party ad network mediation partner for your mobile banner, interstitial, and rewarded ads.

App Prerequisite

  • minSdkVersion of 21 or higher

  • compileSdkVersion of 33 or higher

Configuration Steps

Setting Up Repository in Project

  • Open your Android Studio project and navigate to settings.gradle file

  • Add the following Maven repository configuration inside the dependencyResolutionManagement block

gradle

repositories {
  ...
  maven {
    url = uri("https://maven.pkg.github.com/adster-tech/orchestration-sdk")
    credentials {
      username = GITHUB_USERNAME
      password = GITHUB_TOKEN
    }
  }
}

Adding Dependency

  • Open the build.gradle (Module: app) file.

  • Find the dependencies block and add the following SDK dependency.

Google Ad Manager
dependencies {
  implementation 'com.adster:customadapter:2.0.0.3'
}
ADMOB
dependencies {
  implementation 'com.adster:customadapter:2.0.0.3'
}
AppLovin
dependencies {
  implementation 'com.adster:customadapter-applovin:2.0.0.1.0'
}
Ironsource
dependencies {
  implementation 'com.adster:customadapter-ironsource:2.0.0.1'
}

Authentication

  • It's crucial not to hardcode GitHub credentials. Store credentials in gradle.properties or use environment variables.

  • In gradle.properties, add

    properties
    
    GITHUB_USERNAME=username
    GITHUB_TOKEN=token
  • In settings.gradle, reference these properties:

    gradle
    
    username = findProperty("GITHUB_USERNAME") ?: System.getenv("GITHUB_USERNAME")
    password = findProperty("GITHUB_TOKEN") ?: System.getenv("GITHUB_TOKEN")

Last updated