Professional Documents
Culture Documents
APS - Android SDK Init
APS - Android SDK Init
APS - Android SDK Init
temp
DOCUMENTS
Amazon Publisher Services (APS) Android SDK
Getting Started
Ad Ops
Google Ad Manager
Android SDK initialization
Google AdMob This documentation will outline how to import the APS SDK and set your app id. Please ensure you have completed the first three steps outlined in the
Introduction before importing the SDK. The Android SDK is available to download and import into your Android Studio project via manual integration.
ironSource
The APS Android SDK requires the following:
MAX
Android 4.4 (KitKat API 19) or later
Android SDK
If your SDK supports API versions lower than 19, please see required changes to your manifest file in Step 2.
Google Ad Manager
Android Studio or Eclipse installed with the Android Development Tools (ADT) Plugin
Google AdMob
Java 8 or later
ironSource
AndroidX migration
Other Ad Server
Google Ad Manager
repositories {
Google AdMob
mavenCentral()
ironSource }
MAX
dependencies {
}
Custom Mediation
Unity
repositories {
}
Release Notes
Integration Verification
dependencies {
implementation ("com.amazon.android:aps-admob-adapter:2.0.3")
GDPR }
CCPA
If you are using ironSource, include another dependency.
FAQs
mavenCentral()
S3 Reporting maven {
url 'https://android-sdk.is.com/'
Agreement
}
dependencies {
implementation ("com.amazon.android:aps-sdk:9.4.1")
implementation ("com.ironsource.adapters:apsadapter:4.3.2")
repositories {
mavenCentral()
}
Help
https://dtb-portal.amazon.com/webpublisher/uam/docs/aps-mobile/android 1/6
3/7/22, 10:48 AM APS - Android SDK
dependencies {
implementation ("com.amazon.android:aps-sdk:9.4.1")
implementation ("com.applovin.mediation:amazon-tam-adapter:9.3.0.3")
Manual integration
1. Extract and unzip the aps-sdk.aar file from the downloaded SDK package.
2. Add aps-sdk.aar to your app:
a. On the File menu, click New, and then click New Module.
b. Choose Import .JAR/.AAR Package in the pop-up dialogue, and then click Next.
c. In the new dialogue box, find the aps-sdk.aar location and import it.
d. On the File menu, click Project Structure.
e. Under Modules, click app, and then click the Dependencies tab.
f. Add the .aar file as a dependency.
If you are using Google Ad Manager or AdMob, please refer to the following table for the corresponding APS SDK and Google Mobile Ads SDK versions of
your app. If you’re using AdMob, the corresponding adapter version for aps-admob-adapter.aar is also included below:
Google Mobile Ads Version APS SDK Version APS AdMob Adapter Version
ProGuard
buildTypes {
release {
minifyEnabled true
https://dtb-portal.amazon.com/webpublisher/uam/docs/aps-mobile/android 2/6
3/7/22, 10:48 AM APS - Android SDK
If you wish to pass geo location information, please include the following permissions in your manifest file:
For those integrating with AdMob, ironSource, MAX, and our Custom Mediation solution, please add the following under the <application> section of
your manifest file:
<activity android:name="com.amazon.device.ads.DTBInterstitialActivity"/>
<activity android:name="com.amazon.device.ads.DTBAdActivity"/>
If your minSdkVersion is lower than API 19, please make the following changes:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools = "http://schemas.android.com/tools"
package="com.pbs.sampledtbapp"/>
<uses-sdk tools:overrideLibrary="com.amazon.device.ads"/>
2. Use the following condition to check the Android version during runtime to invoke APS functionality:
AdRegistration.getInstance(APP_KEY, this);
Ad server/mediator identifier
Please use the setAdNetworkInfo method to pass your primary ad server or mediator. For example, if you’re using MAX, you would call the following:
AdRegistration.setAdNetworkInfo(new DTBAdNetworkInfo(DTBAdNetwork.MAX));
GOOGLE_AD_MANAGER
MOPUB_AD_SERVER
ADMOB
AD_GENERATION
IRON_SOURCE
MAX
NIMBUS
OTHER
MRAID
Please pass MRAID info as part of the SDK initialization. Choose one according to your ad server:
// For Google Ad Manager (Google Play Ads Services version 15.0.0 and above)
AdRegistration.setMRAIDPolicy(MRAIDPolicy.CUSTOM);
// For Google Ad Manager (Google Play Ads Services versions below 15.0.0)
AdRegistration.setMRAIDPolicy(MRAIDPolicy.DFP);
Help
https://dtb-portal.amazon.com/webpublisher/uam/docs/aps-mobile/android 3/6
3/7/22, 10:48 AM APS - Android SDK
AdRegistration.setMRAIDPolicy(MRAIDPolicy.CUSTOM);
If your app does not collect geo location, the APS SDK will not receive geo location even if useGeoLocation() is enabled. If your app does collect geo
location, your app should call the AdRegistration.useGeoLocation() method:
AdRegistration.useGeoLocation(true);
Logging/testing
To enable SDK logging and test mode, call the below methods. For more information, visit the Integration Verification guide.
AdRegistration.enableLogging(true);
AdRegistration.enableTesting(true);
Do not forget to remove enableTesting() in production as the test ads are not eligible for monetization.
If you have the OM SDK integrated, you can pass the OMID Partner info using the addCustomAttribute method. Please see the IAB specification for
more information.
Contextual parameters
Contextual parameters can be passed in using the addCustomAttribute(String key, String value); and removed
using removeCustomAttribute(String key);
We recommend you update and pass this to us before every APS ad request.
The total duration of time a user has spent thus far in a specific app session,
expressed in seconds. A session can be defined as the following examples: AdRegistration.addCustomAttribute("SessDuration",
sessDuration String when a user logs in/out or when a user dismisses the app to the "20");
background. This can be anything that you define as a session within your
app.
The url of the content you are displaying to users. For example, if you are AdRegistration.addCustomAttribute("ContentURL",
contentURL String displaying content from https://yourdomain.com/section/content, you can "https://www.amazon.com/");
pass this url to us.
Does
Amazon
Category Data type Description
SDK
Collect?
User or device physical location to an area greater than or equal to 3 square Only if
Approximate
Location kilometers, such as the city a user is in, or location provided by Android’s publisher
location
ACCESS_COARSE_LOCATION permission. elects
Only if
User or device physical location within an area less than 3 square kilometers,
Precise location publisher
such as location provided by Android’s ACCESS_FINE_LOCATION permission.
elects
Personal
Name How a user refers to themselves, such as their first or last name, or nickname. No
info
https://dtb-portal.amazon.com/webpublisher/uam/docs/aps-mobile/android 4/6
3/7/22, 10:48 AM APS - Android SDK
Personal Identifiers that relate to an identifiable person. For example, an account ID,
No
identifiers account number, or account name.
Race and
Information about a user’s race or ethnicity. No
ethnicity
Political or
Information about a user’s political or religious beliefs. No
religious beliefs
Sexual
Information about a user’s sexual orientation. No
orientation
Other personal Any other personal information such as date of birth, gender identity, veteran
No
info status, etc.
Information about a user’s credit. For example their credit history or credit
Credit info No
score.
Other financial
Any other financial information. No
info
Fitness
Information about a user’s fitness, such as exercise or other physical activity. No
information
A user’s emails including the email subject line, sender, recipients, and the
Messages Emails No
content of the email.
SMS or MMS A user’s text messages including the sender, recipients, and the content of the
No
messages message.
Other in-app
Any other types of messages. For example, instant messages or chat content. No
messages
Photos or
Photos A user’s photos. No
videos
Voice or sound
Audio files A user’s voice such as a voicemail or a sound recording. No
recordings
Files and A user’s files or documents, or information about their files or documents
Files and docs No
docs such as file names.
Information about the user’s contacts such as contact names, message history,
Contacts Contacts and social graph information like usernames, contact recency, contact No
frequency, interaction duration and call history.
Page views and Information about how a user interacts with your app. For example, the
App activity No
taps in app number of page views or the screen coordinates of taps.
In-app search
Information about what a user has searched for in your app. No
history
Other user-
Any other user-generated content not listed here, or in any other section. For
generated No
example, user bios or notes.
content
Any other user activity or actions in-app not listed here such as gameplay and
Other actions No
likes.
App info
Crash log data from your app. For example, the number of times your app has
and Crash logs No
crashed, stack traces, or other information directly related to a crash.
performance
Information about the performance of your app. For example battery life,
Diagnostics No
loading time, latency, framerate, or any technical diagnostics.
Other app
performance Any other app performance data not listed here. Yes
data
Device or Identifiers that relate to an individual device, browser or app. For example, an
Device or other
other
identifiers
IMEI number, MAC address, Widevine Device ID, Firebase installation ID, or Yes Help
identifiers advertising identifier.
https://dtb-portal.amazon.com/webpublisher/uam/docs/aps-mobile/android 5/6
3/7/22, 10:48 AM APS - Android SDK
FAQs
How does a publisher elect to pass Precise Location or Coarse Location data?
Location data is an optional parameter for the APS SDK. Publishers can elect for the APS SDK to collect Precise Location or Coarse Location data by
utilizing the useGeoLocation() function. Full details are in the APS integration documentation. Publishers may only elect for the APS SDK to collect
this data if applicable user consent has been obtained, per the terms of the APS agreement.
How does Amazon Ads use Precise Location or Coarse Location data?
Location data is an optional parameter for the APS SDK. After obtaining applicable user consent, per the terms of the APS agreement, the publisher may
elect for the APS SDK to collect this data. If collected, Amazon Ads does not use precise geolocation data for advertising purposes. Amazon Ads systems
obfuscate location data by reducing precision, and we only use obfuscated location data for ad targeting. We do not use precise geolocation data to
target ads.
If publishers participate in TAM (Transparent Ad Marketplace) or UAM (Unified Ad Marketplace) and publisher has elected the APS SDK to collect location
data, precise geolocation data is also forwarded to the third-party buyers that the publisher has chosen to work with through the APS integration.
Amazon Ads systems use IDFA, Android Advertising ID, and related identifiers for advertising purposes such as serving interest based ads, to determine
reach, maintain opt out status, invalid traffic detection and traffic quality, and for frequency capping.
If publishers participate in TAM or UAM, Device IDs are also forwarded to the third-party buyers that the publisher has chosen to work with through the
APS integration.
Conditions of Use
|
Privacy Notice
Copyright © 2013-2022 A9.com, Inc. or its affiliates. An Amazon company.
Help
https://dtb-portal.amazon.com/webpublisher/uam/docs/aps-mobile/android 6/6