Android Integration

You may use the Yodo1 MAS plugin with Godot Engine 3.2.3 or higher.

Integrating the MAS SDK into your mobile app project gives you access to MAS fully managed monetization solution. This solution taps into multiple ad mediation platforms, selecting the one best suited for your game’s monetization through high-quality ad networks that serve in-app ads.

Before you can start monetizing your app, you’ll need to integrate the MAS SDK.

Integrating the SDK

First, you need to download this file. It contains:

  • MAS Android plugin
  • MAS script for Godot (yodo1mas.gd)

Setup your project

1. Configure, install, and enable the “Android Custom Template” for your project by following the official documentation;

2. Copy plugins folder to your Godot project. You have to add it in the path res://android. The plugins folder contains 2 files GodotYodo1Mas.gdapand GodotYodo1Mas.***.aar. Please make sure to open GodotYodo1Mas.gdap with any text editor and check the gradle dependency.

				
					[config]
name="GodotYodo1Mas"
binary_type="local"
binary="GodotYodo1Mas.1.0.1.release.aar"
				
			


If you’re only targeting children under 13 years of age, please add this Gradle dependency:

				
					[dependencies]
remote=["com.yodo1.mas:google:4.6.5"]
				
			


If you’re targeting all ages, or 13+, use this Gradle dependency:

				
					[dependencies]
remote=["com.yodo1.mas:full:4.6.5"]
				
			


3. Open the build.gradle file. You need to add these repositories and activate multiDexEnabled.

				
					maven { url "https://android-sdk.is.com" }
maven { url "https://artifact.bytedance.com/repository/pangle" }
maven { url "https://sdk.tapjoy.com/" }
				
			

				
					multiDexEnabled true
				
			

4. In your res//android/build/AndroidManifest.xml file, use Android label with attribute tools:replace. And add your AdMob App ID.

  • Example of using Android label with attribute tools:replace:
				
					<application tools:replace="android:allowBackup,android:label" android:label="@string/godot_project_name_string" android:allowBackup="false" tools:ignore="GoogleAppIndexingWarning" android:requestLegacyExternalStorage="false" android:icon="@mipmap/icon">
				
			
  • Please replace android:value with your own AdMob App ID (You can find it in MAS dashboard).
				
					<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="YourAdmobID"/>
				
			

5. Add this line to the gradle.properties file:

				
					android.enableDexingArtifactTransform=false
				
			

6. Copy the yodo1mas.gd file from the release archive and paste it into your Godot project.

7. Set up your AppKey

Create a new node, add the yodo1mas.gd script and configure your Appkey. You can find your Appkey in MAS dashboard.

8. Under Project -> Export -> Android -> Options ->

  • Custom Template: check Use Custom Build
  • Plugins: check Godot Yodo1 Mas (this plugin)
  • Permissions: check permissions for Access Network State and Internet

9. Each system has a different version of Gradle installed. Please make sure to match the Grade version with the Gradle plugin version according to the table below.

Plugin Version Required Gradle Version
4.0.0+ 6.1.1+
4.1.0+ 6.5+
4.2.0+ 6.7.1+
4.3.0+ 6.7.1+

10. You can export your Android project. An APK will be created automatically.

NOTE: Every time you install a new version of the Android Build Template, you need to update theAndroidManifest.xml and build.gradle files.

For the next step please test your integration.

CONTENTS