Docy

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