Admob + Mobup through mediation and adapters

249 views
Skip to first unread message

johny1...@gmail.com

unread,
Nov 30, 2016, 7:50:24 PM11/30/16
to Google Mobile Ads SDK Developers
Hello,

I'm using Admob in my Android app to display a simple banner. I have recently learned about Ad Mediation and wanted to try pulling some Mopub ads.

The Admob doc  is very limited but basicaly this what I have done

1) Downloaded and included the Admob/Mobup adatper jar
compile files('libs/libAdapterSDKMoPub.jar')

2)Added the MoPub SDK
compile('com.mopub:mopub-sdk-banner:4.11.0@aar') {
transitive = true
} 3) Added the Mopub banner's UnitId in AdMob Mediation UI 4) I didn't touch to the AdView view
<com.google.android.gms.ads.AdView
android:id="@+id/drawer_adview"
android:layout_width="360dp"
android:layout_height="wrap_content"
fab:adSize="BANNER"
fab:adUnitId="@string/banner_ad_unit_id"/>
banner_ad_unit_id being the original Admob banner's unit id
And that is pretty much it. My question is. Is this enough? Do need to do anything else? Does Admob will automatically pull Mopub ads and inject them inside the banner webview? Do I have to manually "amend" on the fly the adUnitId by using Mopup adUnitId ?
Is there an easy way to test ads pulled from Mopup? I have tried setting a really high eCPM for the Mopup network in Admob Mediation UI But It didn't seem to work

Joshua Lagonera (Mobile Ads SDK Team)

unread,
Dec 1, 2016, 12:20:21 AM12/1/16
to Google Mobile Ads SDK Developers
Hi there,

I believe you are missing a few steps in your integration:
For reference, here are MoPub's official integration guide for mediation.
As for your other questions:
    • Does Admob will automatically pull Mopub ads and inject them inside the banner webview?
      • Yes. The AdMob SDK will interact with MoPub's adapters and automatically pull MoPub ads to show them in your AdView.
    • Do I have to manually "amend" on the fly the adUnitId by using Mopup adUnitId ?
      • No. You only need to add the necessary Adapters, SDKs and other varying requirements for each third party Ad Network you wish to mediate, and your AdMob Ad Unit ID will be enough to fetch ads from the mediated ad networks.
    • Is there an easy way to test ads pulled from MoPub?
      • Setting a high eCPM value for MoPub would do the trick. However, do note that AdMob ads will still be served depending on the case.
    I would also like to note that when you change your Ad Unit ID's settings, or any settings for that matter regardless if it's for AdMob, MoPub or any third party ad network you are mediating with, it would take a few minutes to an hour before they are reflected.

    That said, I have made this sample app with mediation from MoPub already setup if in case you would need a reference on how to integrate with MoPub properly. Just replace the Ad Unit ID with yours in order to test it.

    Regards,
    Joshua Lagonera
    Mobile Ads SDK Team

    johny1...@gmail.com

    unread,
    Dec 1, 2016, 4:43:14 AM12/1/16
    to Google Mobile Ads SDK Developers
    Thank you for your reply Joshua. Yes indeed I had completely missed the adapter code.. I thought that the .jar I had included (a part from the SDK itself) WAS the adapted and that
    AdMob was magically using them somehow.

    I will give it a go with a high eCPM for my country then. But a part from this there is nothing in the logs that I can check? I have tried looking for "mopub" for now but there is nothing showing up.

    Also in your example this declared in AndroidManifest

    com.google.ads.AdActivity
    I didn't see it it the AdMob Starter Guide. In my app I didn't put this but ads work. What is this for? 

    johny1...@gmail.com

    unread,
    Dec 1, 2016, 7:02:52 AM12/1/16
    to Google Mobile Ads SDK Developers
    Also I have a similar question. I have also tried to add Chartboost network and again I'm a bit confused.


    - Add the adapter jar into your Android project.
    - Add the Chartboost SDK into your Android project (Detailed instructions on how
      to import Chartboost SDK are available at:
      #quickstart).
    - Enable the Ad network in the Ad Network Mediation UI.
    - {other instruction ...}

    So again, I have added the SDK + that adapter jar.

    But from you previous response i'm missing something else here no? Where is the equivalence of the GooglePlayServicesInterstitial.java but for Chartboost? Do I need one? I have searched on Chartboost 'help' section but there is nothing related to these kind of file?

    The only thing I found is this non-official implementation which I dont even know if it up to date and in which package I need to put it.
    https://github.com/gemserk/admob-adapters/blob/master/chartboost-adapter/src/main/java/com/gemserk/google/ads/mediation/chartboost/ChartBoostCustomEventInterstitial.java

    Thank you


    On Thursday, December 1, 2016 at 12:50:24 AM UTC, johny1...@gmail.com wrote:

    Veer Arjun Busani(Mobile Ads SDK Team)

    unread,
    Dec 1, 2016, 9:47:22 AM12/1/16
    to Google Mobile Ads SDK Developers
    Hi Johny,

    Once you import the Chartboost SDK and Adaptor into your project, you need to declare its Activity in the Manifest file and that's it. You do not need to import any of its header files as this is taken care of by the adaptor. Here is a sample app that has Chartboost integrated that you can test with.

    Thanks,
    Arjun Busani
    Mobile Ads SDK Team

    johny1...@gmail.com

    unread,
    Dec 1, 2016, 3:05:51 PM12/1/16
    to Google Mobile Ads SDK Developers
    Thank you Arjun. 

    Yes I did add the activity in the Manifest. Thank you for confirming that I dont need anything extra. and thank you for the sample app.

    Just by curiosity, why does with Mopub 'even' if I add this jar "libAdapterSDKMoPub.jar" I still need to manually add "GooglePlayServicesBanner.java" ?
    in com.mopub.mobileads ?

    Thanks


    On Thursday, December 1, 2016 at 12:50:24 AM UTC, johny1...@gmail.com wrote:

    Veer Arjun Busani(Mobile Ads SDK Team)

    unread,
    Dec 1, 2016, 5:07:05 PM12/1/16
    to Google Mobile Ads SDK Developers
    Hi Johny,

    Few networks have exceptions as to whether any additional steps are required such as MoPub and UnityAds. This is why we recommend to go through the guidelines for each of the network as each would have its own unique steps to integrate. In case of MoPub, it is even accepting Custom Events via that class, which basically means nested mediation via a third party network to AdMob to MoPub. Again, you would not have to import any of their headers.

    Thanks,
    Arjun Busani
    Mobile Ads SDK Team

    Reply all
    Reply to author
    Forward
    0 new messages