SDK integration
Requirements
Section titled “Requirements”- Android Gradle Plugin: 8.9.1 or higher (Gradle 8.11.1 or higher)
- Compile SDK: 36 or higher
- Kotlin: 2.2 or higher
- Minimum SDK: 24 or higher
Setup project
Section titled “Setup project”Depending on the language used by the project for the Gradle scripts, you must follow the steps from the corresponding tab:
-
Add the following Maven repositories inside the
repositoriesblock of thesettings.gradlefile:settings.gradle repositories {maven { url 'https://maven.wortise.com/artifactory/public' }maven { url 'https://artifact.bytedance.com/repository/pangle' }maven { url 'https://artifactory.bidmachine.io/bidmachine' }} -
Add the following line inside the
dependenciesblock of thebuild.gradlefile located at the app-level:build.gradle implementation 'com.wortise:android-sdk:1.8.0'
The SDK needs Java 8 compatibility or higher, which is already the default with the required Android Gradle Plugin, so no change is needed. If your project sets compileOptions to a higher version (for example, Java 11 or 17), keep it as it is.
-
Add the following Maven repositories inside the
repositoriesblock of thesettings.gradle.ktsfile:settings.gradle.kts dependencyResolutionManagement {repositories {maven { url = uri("https://maven.wortise.com/artifactory/public") }maven { url = uri("https://artifact.bytedance.com/repository/pangle") }maven { url = uri("https://artifactory.bidmachine.io/bidmachine") }}} -
Add the following line inside the
dependenciesblock of thebuild.gradle.ktsfile located at the app-level:build.gradle.kts implementation("com.wortise:android-sdk:1.8.0")
The SDK needs Java 8 compatibility or higher, which is already the default with the required Android Gradle Plugin, so no change is needed. If your project sets compileOptions to a higher version (for example, Java 11 or 17), keep it as it is.
Setup Manifest
Section titled “Setup Manifest”You need to add the following <meta-data> element in the AndroidManifest.xml file, inside the <application> block, with Google’s application ID as value:
<manifest> ... <application> ... <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/> </application></manifest>Request consent
Section titled “Request consent”You can consult the following section to implement this request and obtain the user consent: User consent
Initialize SDK
Section titled “Initialize SDK”Our recommendation is to initialize the SDK in the Application class of the app, but it can also be done in any main Activity.
To do so, it is necessary to integrate the following code in the onCreate method:
WortiseSdk.initialize(this, "your app key")WortiseSdk.initialize(this, "your app key");Initialization listener
Section titled “Initialization listener”There are two possible ways to know when the SDK finishes its initialization:
Passing a listener as the last parameter of the method WortiseSdk.initialize
Section titled “Passing a listener as the last parameter of the method WortiseSdk.initialize”WortiseSdk.initialize(this, "your app key") { // This listener will be invoked when the initialization finishes}WortiseSdk.initialize(this, "your app key", () -> { // This listener will be invoked when the initialization finishes return Unit.INSTANCE;});Using the method WortiseSdk.wait
Section titled “Using the method WortiseSdk.wait”WortiseSdk.wait { // This listener will be invoked when the initialization finishes}WortiseSdk.wait(() -> { // This listener will be invoked when the initialization finishes return Unit.INSTANCE;});Test mode
Section titled “Test mode”To verify the integration, the SDK provides a test mode that allows the app to always receive ads.
In addition to the option that is available in our dashboard, you can programmatically enable this test mode, from the SDK itself, by using the following code:
AdSettings.testEnabled = trueAdSettings.setTestEnabled(true);© 2026 Wortise. All rights reserved.