Blog Details
Blog Details
Blog Details

ARTICLE

ARTICLE

GameDeveloper – Programmer –

Details

Details

Blog Details Image
Blog Details Image

SDKs and Mediation

Mar 20, 2025

Integrating SDKs and Mediation Adapters in Mobile Games

As a mobile game developer, integrating SDKs (Software Development Kits) and mediation adapters is a crucial part of monetizing and expanding the functionality of your games. Over the years, I’ve worked with several SDKs including AdMob, AppLovin, Meta Audience Network, Unity Ads, and Firebase, and have set up multiple mediation layers to optimize ad revenue across our games.

In this blog, I’ll walk you through a structured approach to integrating SDKs and mediation adapters into your mobile games using Unity, and how you can avoid common pitfalls.

Step 1: Planning Your SDK Stack

Before diving into the code, it’s essential to plan which SDKs you’ll be integrating based on your game's needs. For monetization, you may consider:

  • Ad SDKs: AdMob, AppLovin, Unity Ads, Meta Audience Network

  • Analytics: Firebase, GameAnalytics

  • Crash Reporting: Firebase Crashlytics

  • Remote Config and A/B Testing: Firebase Remote Config

Make sure to also review documentation for version compatibility between SDKs and Unity versions.


Step 2: Setting Up Your Project

Start with a clean and updated Unity project. It’s better to integrate one SDK at a time to isolate any issues during the build or runtime.

  • Open Unity Editor.

  • Set your platform (iOS or Android).

  • Update your Gradle settings and minimum SDK version as required by the ad networks.


Step 3: Import SDKs via Unity Package Manager or External Downloads

Some SDKs are available via Unity's Package Manager, while others require manual downloads from their official sites:

  • Download the Unity packages or .aar/.framework files for Android and iOS.

  • Import them into the Assets/Plugins/ folder appropriately.

Use official guides to prevent missing dependencies.


Step 4: Integrate SDK Code
  • Initialize the SDK in a bootstrap script (usually on game launch).

  • Set up required permissions in AndroidManifest.xml or Info.plist.

  • Configure ad placements, ad units, and callbacks for rewarded, interstitial, and banner ads.

Keep your initialization modular and maintainable for easy debugging and upgrades.

Blog Image
Blog Image
Blog Image
Step 5: Set Up Mediation

Mediation layers help you earn better revenue by serving ads from multiple networks based on bidding and waterfall strategies.

  • Choose a mediation provider (e.g., AdMob or AppLovin MAX).

  • Follow documentation to integrate mediation adapters.

  • Link your game with respective dashboards.

  • Test using test ad units and verify each network is serving ads.

Step 6: Testing and Debugging
  • Use test modes for each network.

  • Use logging to capture initialization states and ad callbacks.

  • Validate build with logcat (Android) or Xcode console (iOS).

Step 7: Optimization and Maintenance
  • Monitor ad performance on dashboards.

  • Adjust waterfall or bidding strategies as per revenue performance.

  • Keep SDKs updated periodically to avoid deprecated issues or security flaws.

Final Thoughts

Integrating SDKs and mediation adapters can be overwhelming at first, but once you understand the structure, it becomes a routine part of game development. Always rely on official documentation and keep your integration modular for long-term maintainability. Each integration teaches you something new—not just about code, but also about how mobile games are run as businesses.