IronSourceUtils
An useful, quick implementation of IronSource Mediation SDK
Prerequisites
Add this to your project-level build.gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add this to your app-level build.gradle
dependencies {
implementation 'com.github.darkeagle1236:IronSourceUtils:Tag'
}
Usage
Init
Add this to onCreate of your first activity
IronSourceUtil.initIronSource(this, "app-key")
Load and show interstitials
IronSourceUtil.showInterstitialAdsWithCallback(
this,
"ad-placement-id",
true,object : AdCallback {
override fun onAdClosed() {
// TODO
}
override fun onAdFail() {
// TODO
}
})
}
Load a banner
IronSourceUtil.showBanner(activity,viewgroup,"ad-placement-id")