The YaftaMobile AdMob Custom Event allows AdMob publishers to add YaftaMobile as a Custom Ad Network within the AdMob platform.
The YaftaMobile Adapter and SDK are available as an AAR via mavenCentral
Add this to Module-level /app/build.gradle before dependencies:
repositories {
mavenCentral()
}
Then add the compile dependencies:
dependencies {
implementation 'com.mustamara.android:yaftamobile-android-sdk:3.0.0'
implementation 'com.mustamara.android:yaftamobile-admob-adapter:2.0.1'
}
Your AndroidManifest.xml will need to be updated in order to complete the SDK integration.
In AndroidManifest.xml, declare the following permissions:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
Then declare your AppID Meta-data:
<meta-data android:name="com.mustamara.yaftamobile.sdk.appid"
android:value="<YOUR-APPID>"
/>
And add the following activity (Only for Interstitial Ad) :
<activity
android:name="com.mustamara.yaftamobile.sdk.ads.interstitial.InterstitialActivity"
android:configChanges="keyboard|keyboardHidden|orientation" />
First you need to define a custom event that points to the specific class in your application through the AdMob interface. Follow these instructions to create a custom event.
Follow AdMob’s instructions to request banner or interstitial ads, but using ad units that you created in Step 3 above.