APS Integration Guide (9.0.0+)

Before you start

Amazon Publisher Services (APS) is an invitation-only program. To integrate the APS, you will need to integrate and initialize both the LevelPlay SDK and APS SDK. Make sure you perform the full integration flow as detailed below to display APS ads in your application.

This guide applies to LevelPlay SDK version 9.0.0 and above. For legacy versions (8.0.0 and above), refer to this article.

Supporting APS Android SDK Range 

The APS Adapter 5.0.0 for Android is designed to integrate the APS Android SDK through a range dependency. By using the 9.8+ dependency, you will be able to automatically integrate to any future APS Android SDK (<9.8.8), without integrating a new LevelPlay adapter.

Step 1. Create an APS account

  1. Reach out to APS to set up your app’s account. To create an APS account, go to the APS website, click the “contact us” button, and open a request.
  2. If your APS request is approved, you will receive an invitation link to sign up and create your account with APS.
  3. The above steps must be completed before you proceed to set up APS in LevelPlay. 

Step 2. Set up your slots in APS Network

  1. Choose the right application from the apps menu and click on setup
  2. Choose LevelPlay as your monetization service setup menu
  3. Add slots and define for each slot :
    1. Name
    2. Ad size
    3. Price points (auto/manual)
  4. Finish adding all slots and pick up your credentials:
    1. Get your app id
    2. Download the price point CSV file

Step 3. Activate APS Network

Inside the LevelPlay platform, access the SDK Networks setup to configure APS parameters into your LevelPlay account.

  1. Once you have the credentials mentioned above, log in to your LevelPlay account and go to Monetize ➣ Setup SDK Networks
  2. Select APS from the table of Available Networks and click on the Activate button
  3. Select APS from the list of ad networks and click Setup.
  4. Enter your APS app ID and upload CSV file as is.
  5. The APS app settings page interface will refresh.

Step 4: 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 5. Add the APS adapter to your build

Gradle

  1. Make sure the following Maven URL exists in your build.gradle script of your app module
    repositories {
    	mavenCentral()
    }

  2. Add the adapter’s Maven name to your build.gradle script of your app module.
    dependencies {
        implementation 'com.unity3d.ads-mediation:aps-adapter:5.0.0'
        implementation 'com.amazon.android:aps-sdk:11.1.0+'
        implementation 'com.iabtcf:iabtcf-decoder:2.0.10'
    }

Step 6. Update AndroidManifest.xml

Manifest Permissions:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

Manifest Activities:

<activity android:name="com.amazon.device.ads.DTBInterstitialActivity"/>
<activity android:name="com.amazon.device.ads.DTBAdActivity"/>

For Proguard Users Only

If you are using ProGuard with the APS adapter, you must add the following code to your ProGuard file:

-keep class com.amazon.device.ads.** { *; }

Step 7. 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.

Done!

You’re now ready to deliver APS demand within your application.


What’s Next?
To leverage additional ad networks through LevelPlay, integrate the network adapters and follow our integration guides.