Bidapp Ads
  • 🎁Ab_dout
  • Integration
    • iOS
      • Getting started
      • Additional Settings
      • App Policy Settings
      • Serverless Settings
      • Interstitial Ads
      • Rewarded Ads
      • Banner Ads
      • SKAdNetwork
      • SwiftUI
    • Android
      • Getting started
      • Additional Settings
      • App Policy Settings
      • Serverless Settings
      • Interstitial Ads
      • Rewarded Ads
      • Banner Ads
      • Jetpack Compose
  • PLUGINS
    • Kotlin Multiplatform
      • Getting started
      • Android Platform Setup
      • iOS Platfrom Setup
      • App Policy Settings
      • Interstitial Ads
      • Rewarded Ads
      • Banner Ads
    • Unreal Engine
      • Getting started
      • App Policy Settings
      • Interstitial Ads
      • Rewarded Ads
      • Banner Ads
      • MREC
    • Unity
      • Getting started
      • Android
      • iOS
      • App Policy Settings
      • Interstitial Ads
      • Rewarded Ads
      • Banner Ads
Powered by GitBook
On this page
  • Gradle (Recommended)
  • Get the pubid string
  • Integrate Networks SDK Adapters
  • Permissions
  • Initialize the SDK
  • Consent and Data APIs

Was this helpful?

  1. Integration
  2. Android

Getting started

This page shows you how to download, import, and configure the Bidapp SDK.

PreviousAndroidNextAdditional Settings

Last updated 1 year ago

Was this helpful?

Gradle (Recommended)

Open the build.gradle file of your app module (app-level build.gradle) in the root of your project.

In the dependencies section, add the following line:

dependencies {
    implementation 'io.bidapp:bidapp-sdk:+'
    ⋮
}
dependencies {
    implementation ("io.bidapp:bidapp-sdk:+")
    ⋮
}

Save the build.gradle file

Now, the Bidapp SDK is integrated into your Android project using Gradle.

Minimum supported version Android 7.0 (API level 24) or above

Get the pubid string

Request pubid by sending email to

Integrate Networks SDK Adapters

Bidapp SDK contains implementations of adapters to other Networks SDKs.

To install them:

  1. Open the build.gradle file of your app module (app-level build.gradle) in the root of your project.

  2. In the dependencies section, add the following line or any combination of them:

dependencies {
    implementation 'io.bidapp.networks:applovin:+'
    implementation 'io.bidapp.networks:applovinmax:+'
    implementation 'io.bidapp.networks:unity:+'
    implementation 'io.bidapp.networks:liftoff:+'
    implementation 'io.bidapp.networks:admob:+'
    implementation 'io.bidapp.networks:chartboost:+'
    implementation 'io.bidapp.networks:startIo:+'
    implementation 'io.bidapp.networks:facebook:+'
    implementation 'io.bidapp.networks:digitalturbine:+'
    ⋮
}
dependencies {
    implementation ("io.bidapp.networks:applovin:+")
    implementation ("io.bidapp.networks:applovinmax:+")
    implementation ("io.bidapp.networks:unity:+")
    implementation ("io.bidapp.networks:liftoff:+")
    implementation ("io.bidapp.networks:admob:+")
    implementation ("io.bidapp.networks:chartboost:+")
    ⋮
}
  1. Save the build.gradle file

Before adding Admob adapter, it's crucial to add the Admob APPLICATION_ID as a meta-data in your AndroidManifest.xml file. This is mandatory for adapter to function correctly.

Before adding Applovin\Applovin MAX adapters, it's crucial to add the Applovin SDK KEY as a meta-data in your AndroidManifest.xml file. This is mandatory for adapters to function correctly.

Permissions

Make sure to add the next permissions to your AndroidManifest.xml to ensure the SDK functions as intended:

  • For accessing the Google Advertising ID.

<uses-permission android:name="com.google.android.gms.permission.AD_ID" />

This is required by the Android Advertising ID (AAID) module - com.google.android.gms:play-services-ads-identifier

  • For analytics.

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

  • For the SDK to operate correctly.

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

Initialize the SDK

Initialize the SDK in your app onCreate() method of your launch Activity

Ad assets that are fully cached result in a better user experience. Therefore, always initialize the Bidapp SDK on startup to give mediated networks the maximum amount of time to cache ads. This is especially important with video ads.

public class MainActivity extends AppCompatActivity implements   	BIDFullscreenLoadDelegate {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        BIDConfiguration bidConfig = new BIDConfiguration();
        
        // Comment out those ad formats that you don't use:
        bidConfig.enableInterstitialAds();
        bidConfig.enableRewardedAds();
        bidConfig.enableBannerAds_320x50();
        bidConfig.enableBannerAds_300x250();

        // TODO: replace this pubid with your personal one obtained from bidapp
        String pubid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";

        BidappAds.start(pubid, bidConfig, this);
    }
}
class MainActivity : AppCompatActivity(), BIDFullscreenLoadDelegate {

    private var interstitial : Interstitial? = null
    private var rewarded : Rewarded? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        setContentView(R.layout.activity_main)

      	interstitial = Interstitial(this)
	interstitial?.setLoadDelegate(this)

	rewarded = Rewarded(this)
	rewarded?.setLoadDelegate(this)


        val bidConfig = BIDConfiguration()

        //Comment out those ad formats that you don`t use:
        bidConfig.enableInterstitialAds()
        bidConfig.enableRewardedAds()
        bidConfig.enableBannerAds_320x50()
        bidConfig.enableBannerAds_300x250()

        //TODO: replace this pubid with your personal, obtained from bidapp
        val pubid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

        BidappAds.start(pubid, bidConfig, this)
    }
}

Consent and Data APIs

In order to ensure you obtain consent from your users in applicable jurisdictions on behalf of our monetization partners and correctly pass consent flag values to Bidapp, please review App Policy Settings

If you want to receive release updates for adapters, subscribe to our GitHub repository:

Pay attention to the pubid string obtained earlier at of this instruction.

connect@bidapp.io
GitHub repository
Get the pubid string