SDK Implementation Guide
  • 📱SDK Implementation Guide
  • How to Configure
    • 💡Initialising the SDK
  • How to Render an Ad
    • 📪Banner Ad
    • 📪Interstitial Ad
    • 📪Rewarded Ad
    • 📪Native Ad
    • 📪Custom Native Ad
  • Beta Ad Format's
    • 🎨App open (Beta)
    • 🎨In-stream Video (Beta)
  • Feature's only for GAM
    • 🎨Adaptive Banner Ad (Only for GAM)
    • 🎨Render Unified Ad (Only for GAM)
    • 🎨How to pass predefined custom targeting values in ad request (Only for GAM)
    • 🎨How to pass publisher provided identifiers in ad request (PPID) (Only for GAM)
    • TEST AD UNITS
  • Manifest Changes Required for SDK
  • Integrate Ads & APP Ads For Easy Management
Powered by GitBook
On this page

Was this helpful?

SDK Implementation Guide

This guide provides a comprehensive step-by-step process for integrating the AdSter SDK into your Android application. Ensure you follow each section carefully for successful implementation

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
    }
  }
}

Replace GITHUB_USERNAME and GITHUB_TOKEN with your GitHub username and personal access token (create a classic token with read only access from your personal GitHub profile OR reach out to us to get an Adster token)


Adding Dependency

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

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

gradle

implementation 'com.adster:orchestrationsdk:1.3.17'

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")

This approach enhances security by keeping credentials out of source control.

NextInitialising the SDK

Last updated 1 day ago

Was this helpful?

📱