Skip to main content

Android

Configure the SDK

Make sure multiDex is enabled in your build.gradle.

defaultConfig {
multiDexEnabled true
}

Add this content to gradle.properties file.

android.useAndroidX=true
android.enableJetifier=true
android.enableDexingArtifactTransform=false

Add AdMob ID

  • Add your AdMob ID to your app's AndroidManifest.xml file.
  • Your AdMob ID can be found under the "details" of your app on MAS Dashboard.
  • Please replace android:value with your own AdMob ID.
<manifest>
<application>
<!-- Sample AdMob ID: ca-app-pub-3940256099942544~123456789 -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="YOUR_AdMob_APP_ID"/>
</application>
</manifest>

Initialize the SDK

Initialize the SDK by using the onCreate method of Activity.

Yodo1Mas.getInstance().initMas(this, "YourAppKey", new Yodo1Mas.InitListener() {
@Override
public void onMasInitSuccessful() {
}

@Override
public void onMasInitFailed(@NonNull Yodo1MasError error) {
}
});

Next Steps

Video Tutorial