Admob + Mediation Plugin for Unity5 (Android & iOS)

489 views
Skip to first unread message

roshka...@gmail.com

unread,
Sep 22, 2016, 7:09:42 PM9/22/16
to Google Mobile Ads SDK Developers
Hello, We made a little plugin for Unity5 to get Admob with Mediation working on iOS & Android.

It currently supports AdColony, AppLovin, Vungle, Chartboost, UnityADS & Facebook Audience Network.

It uses the latest version of GoogleMobileAds (3.0.7)

You can download the latest .unitypackage file from here: https://goo.gl/HnYYOQ
You can find the repo (and instructions) of this project here: https://github.com/pescode/Unity5-Admob-with-Mediation

You won't need to setup XCODE or AndroidManifest... it has all the configurations that you'll need.

If you want to do a quick test

1. Create an empty project
2. Import admobWithMediationv101.unitypackage to your project
3. Open Test scene
4. Add your Admob interstitial and rewarded ad unit ids in RshkAds.cs (line 41-42)...
(iOS)
3. ONLY IF YOU USE APPLOVIN: OPEN Editor/PostBuildProcess.cs. Add your SDK on line 115.
4. Build and Run!
(ANDROID)
3. ONLY IF YOU USE APPLOVIN: OPEN Plugins/Android/GoogleMobileAds/AndroidManifest.xml . Add your SDK on line 41.
4. Download Google Play Game Services plugin for Unity from here . And import to your project
5. Go to Window -> Google Play Games -> Setup -> Android Setup... (to setup googleplaygames services)
6. Build and Run!


Message has been deleted

Fehr Hassan

unread,
Sep 26, 2016, 8:09:22 AM9/26/16
to Google Mobile Ads SDK Developers
by using this plugin , no need to import libraries for each network nor adapters ?

roshka...@gmail.com

unread,
Sep 26, 2016, 10:33:03 AM9/26/16
to Google Mobile Ads SDK Developers
No... you can import only the libraries and adapters for the network that you need...

Android
1) Adcolony files
adcolony.jar
Remove lines 26-37 from the manifest Assets/Plugins/Android/GoogleMobileAdsPlugin/AndroidManifest.xml

2) Applovin
applovin-admob-adapter.jar
applovin-sdk-6.3.2.jar
Manifest Assets/Plugins/Android/GoogleMobileAdsPlugin/AndroidManifest.xml lines 39-43

3) Chartboost
CharboostAdapter.jar
Charboost.jar
Manifest Assets/Plugins/Android/GoogleMobileAdsPlugin/AndroidManifest.xml lines 45-51

4) Facebook
FacebookAdapter.jar
AudienceNetwork.aar
Manifest Assets/Plugins/Android/GoogleMobileAdsPlugin/AndroidManifest.xml lines 53-54

5) Vungle
VungleAdapter.jar
vungle-publisher-adaptive-id-4.0.2.jar
dagger-2.4.jar
javax.inject-1.jar
Manifest Assets/Plugins/Android/GoogleMobileAdsPlugin/AndroidManifest.xml lines 56-62

6) UnityAds
Assets/Plugins/Android/unity-ads/
Assets/Plugins/Android/unity-ads.aar
Manifest Assets/Plugins/Android/GoogleMobileAdsPlugin/AndroidManifest.xml lines 56-62

Syed Sohaib Ali

unread,
Sep 29, 2016, 1:39:53 AM9/29/16
to Google Mobile Ads SDK Developers
Hi,

For adding facebook adds we need to place app id here or placement id in manifest given below.
...Manifest Assets/Plugins/Android/GoogleMobileAdsPlugin/AndroidManifest.xml lines 53-54

roshka...@gmail.com

unread,
Sep 29, 2016, 11:16:05 AM9/29/16
to Google Mobile Ads SDK Developers

Your facebook AppID... your placement id should go in your Admob Facebook Mediation dashboard... now I'm wondering if its necessary your FB app id in the manifest... I will read the docs

xbarb...@gmail.com

unread,
Oct 12, 2016, 9:41:30 AM10/12/16
to Google Mobile Ads SDK Developers
Assets/PlayServicesResolver/Editor/IResolver.cs(76,27): error CS0433: The imported type `Google.JarResolver.PlayServicesSupport' is defined multiple times

what I can do?

roshka...@gmail.com

unread,
Oct 12, 2016, 1:20:30 PM10/12/16
to Google Mobile Ads SDK Developers
I had the same issue yesterday... I just deleted the folder PlayServicesResolver and imported Google Play Games package again...
Message has been deleted

xbarb...@gmail.com

unread,
Oct 13, 2016, 7:59:24 AM10/13/16
to Google Mobile Ads SDK Developers
I just deleted JarResolverLib and works =)
I did work without even installing the Google Play Games Services

thank you, this plugin was very helpful

why you dont share this on the asset store?

User

unread,
Jan 22, 2017, 10:05:14 PM1/22/17
to Google Mobile Ads SDK Developers
Hi,

I am using your plugin and I have noticed that this code never gets called when debugging:

Instance.StartCoroutine(RewardedDone());

// We need this to avoid errors on Android

IEnumerator RewardedDone()

{

yield return new WaitForSeconds(1f);

AudioListener.pause = false;

OnRewardedCompleted();

RequestRewarded();

}


In fact, it looks like any call to a function that yield (Coroutine) will not be executed if called from any of the delegates in your example script.

Could you please confirm that you also aren’t able to execute this code as well?

Gamerz Share

unread,
Aug 10, 2017, 5:10:54 AM8/10/17
to Google Mobile Ads SDK Developers

Hi
i am facing an issue where i am not getting applovin ad to be showed
i am using unity and admob mediation and calling applovin through custom event using class name: com.applovin.mediation.AppLovinCustomEventInterstitial
and also using this in AndroidManifest.xml

i am using this adapter
https://github.com/AppLovin/SDK-Network-Adaptors/tree/master/AdMob/Android/Unity
and SDK version 6.3.0
i am getting the following error
Couldnot show interstitial from adapter
java.lang.NullPointerException: Attempt to invoke interface method 'void com.applovin.adview.AppLovinInterstatialAdDialog.setAdDisplayListener(com.applovin.sdk.AppLovinAdDisplayListener)' on a null object reference
at com.applovin.mediation.ApplovinCustomEventinterstatial.showInterstatial(AppLovinCustomEventInterstitial.java:87)

Bharani Cherukuri (Mobile Ads SDK Team)

unread,
Aug 10, 2017, 1:47:19 PM8/10/17
to Google Mobile Ads SDK Developers
Hello, 

Thank you for contacting us. Based on the stack trace, it looks like the crash is related to the AppLovin Adapter. You will have to reach out to the AppLovin Support Team or post your concerns on this Github page. Also, please refrain from re-opening old threads. If you have an issue that you need help with, feel free to open a new thread. 

Regards,
Bharani Cherukuri
Mobile Ads SDK Team
Reply all
Reply to author
Forward
0 new messages