TopOn Integration

TopOn Integration

Follow these steps to integrate TopOn mediation with your RTB-Stack SDK project.

Step 1: Install the RTB-Stack SDK

Ensure the RTB-Stack SDK is installed in your project before proceeding with the TopOn integration.

Step 2: Add Repositories

Add the necessary repositories to your project-level build.gradle file:

repositories {
    flatDir {
        dirs 'libs'
    }
    // Anythink (Core)
    maven {
        url "https://jfrog.anythinktech.com/artifactory/overseas_sdk"
    }
}
Step 3: Add Dependencies

In your app-level build.gradle, add the TopOn SDK and the RTB-Stack mediation SDK dependency:

dependencies {
    // Anythink (Necessary)
    api "com.anythink.sdk:core-tpn:6.4.19.1"
    api "com.anythink.sdk:nativead-tpn:6.4.19"
    api "com.anythink.sdk:banner-tpn:6.4.19"
    api "com.anythink.sdk:interstitial-tpn:6.4.19"
    api "com.anythink.sdk:rewardedvideo-tpn:6.4.19"
    api "com.anythink.sdk:splash-tpn:6.4.19"

    // Androidx (Necessary)
    api "androidx.appcompat:appcompat:1.1.0"
    api "androidx.browser:browser:1.4.0"

    // Tramini
    api "com.anythink.sdk:tramini-plugin-tpn:6.4.19"

    // RTB-Stack SDK Mediation for TopOn
    implementation 'com.rtb-stack.sdk.mediation.topon'
}
Step 4: Update AndroidManifest.xml

Ensure your AndroidManifest.xml includes the necessary configurations:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.anythink.sdk">
    <application>
        <uses-library android:name="org.apache.http.legacy" android:required="false"/>
    </application>
</manifest>

If the TopOn SDK integration includes interaction with other networks, additional data may be required. Find the right integration sample for your case here.

Step 5: Initialize the TopOn SDK

Initialize the TopOn SDK in your application class:

public class DemoApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        ATSDK.init(this, "Your App_Id", "Your App_Key");
    }
}

You can obtain the AppID and AppKey from the TopOn portal. For a detailed description of TopOn SDK integration, visit TopOn SDK Integration Guide.

Step 6: Configure Mediation for TopOn in RTB-Stack

After integrating the SDK, configure TopOn as a mediation partner in the RTB-Stack platform.

Updated on January 06, 2025