Integrating Firebase Google Admob on Android Ultimate Plugin for Unity3d

Hi Guys, After we Integrate Google Play Services with Android Ultimate Plugin For Untiy3d Successfully, we are now about to try the Firebase  Google Admob For Unity3d this is the newest way on adding Google Admob for your game after Google Acquired the Firebase technology they combine it quickly on their API like Admob and some other things like Analytics because Firebase is one of the unique Technology now a days that can be easily use by any one quickly  because it’s so simple and easy to use with a lot of features available.

to setup this on Unity3d this please follow and read these links below

Admob Setup for Unity3d

Link for Google Mobile Ads Unity3d Plugin

Plugin API for Untiy3d

Setup for Integrating Firebase Analytics for Unity3d

Firebase Docs and Features

This post will be updated after we completed this integration and we will give you our findings on this integration like we did on google play services, so see you for now



We have successfully Integrate Google Admob Ads on Unity3d with Android Ultimate Plugin, Google play services and Google Mobile ads our findings

  1. you just need to change the min sdk to 9 and target sdk to 16 on Android Manifest of GoogleMobileAdsPlugin folder
  2.  change the target sdk on file to 16

and then you can build it successfully, here’s the demo apk with google admob banner ads running , install it and try to see it in action 🙂

link for demo APK

this Finger VS Bugs game have Android Ultimate Plugin, Google Play Services and Google Mobile Ads which is Admob we used Banner Ads on this game try it out 🙂

Information about Admob Banner Sizes

Ad Request Targeting to customize your ads based on your target audience

and yes for testing admob on device this link might help you

For getting device id  for testing admob ads

     public static string GetAndroidAdMobID() {
         UnityEngine.AndroidJavaClass up = new UnityEngine.AndroidJavaClass("com.unity3d.player.UnityPlayer");
         UnityEngine.AndroidJavaObject currentActivity = up.GetStatic<UnityEngine.AndroidJavaObject>("currentActivity");
         UnityEngine.AndroidJavaObject contentResolver = currentActivity.Call<UnityEngine.AndroidJavaObject>("getContentResolver");
         UnityEngine.AndroidJavaObject secure = new UnityEngine.AndroidJavaObject("android.provider.Settings$Secure");
         string deviceID = secure.CallStatic<string>("getString", contentResolver, "android_id");
         return Md5Sum(deviceID).ToUpper();
     public static string GetIOSAdMobID() {
         return Md5Sum(UnityEngine.iPhone.advertisingIdentifier);
     public static string Md5Sum(string strToEncrypt) {
         System.Text.UTF8Encoding ue = new System.Text.UTF8Encoding();
         byte[] bytes = ue.GetBytes(strToEncrypt);
         System.Security.Cryptography.MD5CryptoServiceProvider md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
         byte[] hashBytes = md5.ComputeHash(bytes);
         string hashString = ""; 
         for (int i = 0; i < hashBytes.Length; i++) {
             hashString += System.Convert.ToString(hashBytes[i], 16).PadLeft(2, '0');
         return hashString.PadLeft(32, '0');

this code is if from that link in case it’s not active anymore 🙂


Thanks for  reading and visiting 🙂

for more question or comments or suggestions just email us at

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.