How to Integrate APS with Ad Units APIs

 This guide provides step-by-step instructions on integrating the Amazon Publisher Services (APS) network with LevelPlay, utilizing the Ad Units APIs for existing APS integrations. 

Min SDK Version: 8.7.0+

Step 1: Verify and download your APS configuration 

  1. Navigate to your APS account.
  2. Download the CSV configuration file, for the relevant application. 
  3. Before downloading, make any necessary changes to the configuration. You can always return to your APS account to make further changes.

Step 2: Update the APS settings on the LevelPlay platform

  1. Go to the instance page for your desired app within the LevelPlay platform
    .
  2. Update the APS settings by uploading your downloaded CSV configuration file. Click the “Replace” button.
  3. The APS app settings page interface will refresh.

Step 3: Update APS data in LevelPlay dashboard 

  • Note that the “Slot Name,” “Price Points,” and “Size” fields are automatically populated.
  • Fill in the following fields for each Slot Name:
    • UUID
    • APS Format
    • Size
  • You may need to refer to the APS site to obtain this information.
  • After completing the UUID, APS Format, and Size fields, click the “SAVE” button.

Step 4. Download APS adapter

Download the AAR file (Adapter 4.3.17+) and place it in your project structure. Update your Gradle build files to add a reference to the local AAR. 

Make sure to remove any prior references to an APS adapter from the Gradle build file.

APS Dependencies

Implement the APS SDK and additional dependencies in the Gradle build. 

For more details on APS integration, please refer to the APS Resources for Android.

Gradle example 

dependencies {
   implementation ('com.amazon.android:aps-sdk:11.0.0+') 
   implementation ("com.iabtcf:iabtcf-decoder:2.0.10")
   // Update the path to match your AAR's location 
  implementation files('libs/aps-adapter-4.3.17.1.aar')
}

If you haven’t specified ‘libs’ folder, make sure your Gradle files knows where to locate local files:

repositories {
   flatDir {
      dirs 'libs'
   }
}

Step 5. Init APS SDK

The APS network requires that you initialize both the ironSource and APS SDKs to display APS ads. 

Initialize the APS SDK as soon as your application is opened and before initializing the ironSource SDK. Use the APS App ID, defined in Step 2 of the APS setup. 

AdRegistration.getInstance(APS_APP_ID, this);
//Where 'this' is an activity context.
AdRegistration.getInstance(APS_APP_ID, this);
//Where 'this' is an activity context.

Step 6. Remove Prior Load Logic

This adapter no longer requires sharing APS bid info with LevelPlay mediation. Please remove the following code:

  1. The loading of the APS ad request before each ad unit load.
  2. The calling of setNetworkData to share the APS bid info with LevelPlay.