Menu

Integration

Download the Latest SDK

Please check here to download the latest SDK.

  1. Please select the latest version
  2. Please select the ad format
  3. Please select the network
  4. Please select whether to collect materials
  5. Please click to generate access code
  6. Please paste the Gradle code to your build.grafle file
  7. Please paste the AndroidManifest.xml code into your AndroidManifest.xml file. You also need to add the following code to your AndroidManifest.xml file
    <application> 
     <!-- Android 9 and above adaptation -->
     <uses-library android:name="org.apache.http.legacy" android:required="false"/>
    
     <!-- If there is an integrated Admob SDK, the following configuration needs to be added-->
     <!-- and the value of value is the ID of the application created in the Admob backend-->
     <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" 
                         android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
     
    </application>
  8. If you use ProGuard, please paste the ProGuard configuration code into your proguard-rules.pro file
  9. When shrinkResource is enabled, ensure to place the downloaded keep.xml file in your project's res/raw directory. Additionally, if utilizing a resource optimization tool like AndResProguard, incorporate the contents of whitelists.txt into the tool’s whitelist configuration.

 

Initialize the SDK

  1. If your app is distributed in the European Union (EU) region, it is necessary to configure General Data Protection Regulation (GDPR) compliance before initialization.

  2. If Admob is integrated and targeting the EU region, you must set up Google's User Messaging Platform (UMP), and once Google UMP is set, there's no need for additional GDPR configuration.

  3. If your app needs to present the privacy policy terms and request user consent at the first launch, please refer to the TopOn Privacy Policy guide.

  4. Furthermore, if your application is to be listed on Google Play, in accordance with Google Data Safety requirements, you are obliged to disclose data collection practices of your App and all SDKs integrated within your App. This can be configured using the TopOn Google Data Safety guide.

  5. If your app uses multiple processes, please perform SDK initialization operations only in the main process.

public class DemoApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate()
        ATSDK.init(this, "Your App_Id", "Your App_Key");
    }
}
 
Previous
Android Guide
Next
AD Formats
Last modified: 2025-05-30Powered by