Native SDK

Before You Begin

📘

To integrate the Bidease SDK, you need an active publisher account on the Bidease Monetize platform. If you don't have one yet, please reach out to your Bidease account manager or contact us at [email protected].


❗️

Prerequisites

Minimum Android SDK: 23 (Android 6.0)

Target API: 35



1. Installation

Add the Bidease repository and dependencies to your app-level build.gradle:

dependencies {
    implementation("com.bidease:bidease-mobile:2.0.6")
}

2. Initialization

2.1. Getting your App Key

Your App Key is available in the Bidease Monetize dashboard:

  1. Log in to your account at monetize.bidease.com
  2. Go to Applications
  3. Open the required application
  4. Copy the App Key

2.2. SDK Initialization

Use the App Key from the step above to initialize the SDK. Call BideaseMobile.init() as early as possible in your app lifecycle — ideally in your Application.onCreate() or main Activity.onCreate(). Ad requests made before initialization is complete will not be served.

import com.bidease.mobile.BideaseMobile
import com.bidease.mobile.InitFailure
import com.bidease.mobile.InitParams
import com.bidease.mobile.InitSuccess

val result = BideaseMobile.init(applicationContext, InitParams("YOUR_APP_KEY"))
when (result) {
    is InitSuccess -> { /* SDK is ready */ }
    is InitFailure -> { /* Handle error: result.error */ }
}
❗️

Don't forget to replace YOUR_APP_KEY with the App Key from your Bidease Monetize dashboard.


3. Ad Formats

📘

Before loading ads, make sure you have created the corresponding placements in the Bidease Monetize dashboard. The placementName in your code must match the placement name configured in the UI. Set up your placements →

3.1. Banner

Supported sizes:

ConstantSizeDescription
AdSize.BANNER_320x50320×50Standard banner
AdSize.BANNER_300x250300×250Medium rectangle (mrec)
import com.bidease.mobile.LoadParams
import com.bidease.mobile.ads.AdSize
import com.bidease.mobile.bannerads.BannerLoadFailure
import com.bidease.mobile.bannerads.BannerLoadSuccess
import com.bidease.mobile.bannerads.BannerView

val bannerView = BannerView(context)
container.removeAllViews()
container.addView(bannerView, ViewGroup.LayoutParams(
    ViewGroup.LayoutParams.MATCH_PARENT,
    ViewGroup.LayoutParams.WRAP_CONTENT
))

bannerView.onLoaded = { println("Banner loaded") }
bannerView.onDisplayed = { println("Banner displayed") }
bannerView.onClicked = { println("Banner clicked") }
bannerView.onClosed = { println("Banner closed") }
bannerView.onFailed = { error -> println("Banner failed: $error") }

val result = bannerView.load(AdSize.BANNER_320x50, LoadParams(placementName = "banner_main"))
when (result) {
    is BannerLoadSuccess -> {
        println("Banner loaded: ${result.responseData}")
    }
    is BannerLoadFailure -> {
        println("Banner failed: ${result.error}")
    }
}

3.2. Interstitial

import com.bidease.mobile.LoadParams
import com.bidease.mobile.interstitialads.InterstitialAd
import com.bidease.mobile.interstitialads.InterstitialLoadFailure
import com.bidease.mobile.interstitialads.InterstitialLoadSuccess

val interstitialAd = InterstitialAd(applicationContext)

interstitialAd.onLoaded = { println("Loaded") }
interstitialAd.onDisplayed = { println("Displayed") }
interstitialAd.onClicked = { println("Clicked") }
interstitialAd.onClosed = { println("Closed") }
interstitialAd.onFailed = { error -> println("Failed: $error") }

val result = interstitialAd.load(LoadParams(placementName = "interstitial_main"))
when (result) {
    is InterstitialLoadSuccess -> {
        println("Loaded: ${result.responseData}")
    }
    is InterstitialLoadFailure -> {
        println("Failed: ${result.error}")
    }
}

// Show
interstitialAd.show()

3.3. Rewarded

Rewarded ads extend interstitial with an additional onRewarded callback that fires when the user completes the ad.

import com.bidease.mobile.LoadParams
import com.bidease.mobile.interstitialads.InterstitialLoadFailure
import com.bidease.mobile.interstitialads.InterstitialLoadSuccess
import com.bidease.mobile.rewardedads.RewardedAd

val rewardedAd = RewardedAd(applicationContext)

rewardedAd.onRewarded = { println("User earned reward!") }
rewardedAd.onLoaded = { println("Loaded") }
rewardedAd.onDisplayed = { println("Displayed") }
rewardedAd.onClicked = { println("Clicked") }
rewardedAd.onClosed = { println("Closed") }
rewardedAd.onFailed = { error -> println("Failed: $error") }

val result = rewardedAd.load(LoadParams(placementName = "rewarded_main"))
when (result) {
    is InterstitialLoadSuccess -> {
        println("Loaded: ${result.responseData}")
    }
    is InterstitialLoadFailure -> {
        println("Failed: ${result.error}")
    }
}

// Show
rewardedAd.show()

4. Privacy & Consent

You can pass privacy and consent parameters explicitly via LoadParams.PrivacyParams. This allows you to forward user consent signals directly to the SDK at load time.

import com.bidease.mobile.LoadParams

val privacyParams = LoadParams.PrivacyParams(
    coppaEnabled = true,
    subjectToGdpr = true,
    subjectToCoppa = false,
    usPrivacyString = "1YNN",
    gppString = "DBACNYA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA~1YNN",
    gppSid = listOf(2, 6),
    userConsentString = "CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA",
    subjectToLgpd = true
)

val result = bannerView.load(
    AdSize.BANNER_320x50,
    LoadParams(
        placementName = "banner_main",
        privacyParams = privacyParams
    )
)
FieldTypeDescription
coppaEnabledBooleanEnable COPPA compliance
subjectToGdprBoolean?Subject to GDPR
subjectToCoppaBoolean?Subject to COPPA
usPrivacyStringString?IAB US Privacy string (e.g. "1YNN")
gppStringString?IAB GPP consent string
gppSidList<Int>?GPP section IDs
userConsentStringString?IAB TCF consent string
subjectToLgpdBoolean?Subject to Brazilian LGPD

PrivacyParams can be passed to any ad format's load() call — banner, interstitial, or rewarded.


5. Test Mode

Once you've implemented the SDK, you can test ads before release using one of the two methods below.

Option 1: Enable via Code

Pass testMode = true in LoadParams:

// With placement name
val result = interstitialAd.load(LoadParams(placementName = "test", testMode = true))

// Without placement name
val result = interstitialAd.load(LoadParams(testMode = true))

Option 2: Enable via Dashboard

You can also activate test mode directly in the Bidease Monetize dashboard without any code changes:

  1. Go to Applications and open the required app
  2. Navigate to Test Devices and add the devices you want to test on — use GAID (Android Advertising ID)
  3. Enable Test for the application

QA Checklist

⚠️

Important — please read before testing:

  • Test Mode provides nearly 100% fill — this is expected behavior for QA only.
  • Disable Test Mode before submitting your app to the Google Play.
  • Ensure GAID tracking is enabled on your test device so the Bidease team can review logs and assist with troubleshooting if needed.
  • If you run into any issues, contact your Bidease account manager.