Add Adrop to Android
Prerequisites
Install or update Android Studio to its latest version.
Make sure that your project meets these requirements:
Targets API level 23 (M) or higher
Uses Android 6.0 or higher
minSdkVersion
23
Uses Jetpack (AndroidX), which includes meeting these version requirements:
com.android.tools.build:gradle
v7.3.0 or latercompileSdkVersion
33
Kotlin 1.8.20 or higher
Sign into Adrop using your email or Google account.
Add Adrop using the Adrop console
Adding Adrop to your app involves tasks both in the Adrop console and in your open Android project (for example, you download Adrop config files from the console, then move them into your Android project).
Step 1: Create an Adrop project
Before you can add Adrop to your Android app, you need to create an Adrop project to connect to your Android app.
Step 2: Register your app with Adrop
To use Adrop in your Android app, you need to register your app with your Adrop project. Registering your app is often called "adding" your app to your project.
Make sure to enter the package name that your app is actually using. The package name value is case-sensitive, and it cannot be changed for this Adrop Android app after it's registered with your Adrop project.
Go to the Adrop console.
In the center of the project app page, click the Android icon button to launch the setup workflow.
Enter your app's package name in the Android package name field
A package name uniquely identifies your app on the device and in the Google Play Store.
A package name is often referred to as an application ID.
Find your app's package name in your module (app-level) Gradle file, usually
app/build.gradle
(example package name:com.yourcompany.yourproject
).Be aware that the package name value is case-sensitive, and it cannot be changed for this Adrop Android app after it's registered with your Adrop project.
Enter other app information: App nickname.
App nickname: An internal, convenience identifier that is only visible to you in the Adrop console
Click Register app.
Step 3: Add an Adrop configuration file
Download adrop_service.json to obtain your Adrop Android platforms config file.
Move your config file into your assets directory.
Step 4: Add Adrop SDK to your app
In your module (app-level) Gradle file (usually
<project>/build.gradle.kts
or<project>/build.gradle
), add the dependency for the Adrop in your app.
After adding the dependency, sync your Android project with Gradle files.
Step 5: Initialize Adrop in your app
The final step is to add initialization code to your application.
Import the
Adrop
Initialize an Adrop instance with your app's Application Context
Next Steps
You're all set! Please register an Ad unit to show ads to users.
Learn how to Create your Ad unit.
Last updated