Android Tutorial Admob Mediation With Chartboost

Discussion in 'Tutorials & Examples' started by tufanv, Mar 27, 2017.

  1. tufanv

    tufanv Expert Licensed User

    Hello,

    as @sorex requested, this is a short tutorial for mediation with admob for chartboost.

    1) Register with chartboost. Add your app. Navigate to campaigns / Publishing . Click Create New Campaign and select network publishing again. Select Video Interstitial and create the campaign.

    Do the same again to create Static Interstitial which means only image interstitial.

    Now You have 2 active campaign.

    2) Go to admob. Select monetize. Click on the app. Click 1 ad source next to your app's interstitial ad unit
    click add network. Select chartboost. Enter your app's appid and appsignature ( you can find those under basic settings on chartboost panel for your app ). Set e high ecpm for chartboost like $5 for testing so that chartboost ads shows first.

    3) Download adapter and sdk for chartboost ( download the aar file from files tab )
    adapter : https://bintray.com/google/mobile-ads-adapters-android/com.google.ads.mediation.chartboost#read

    sdk : https://answers.chartboost.com/hc/en-us/categories/200356615

    4) Add lib and adapter to your project

    Code:
    #AdditionalJar: chartboost.jar
    #AdditionalJar: adapterchartboost.aar
    5) add manifest entry:


    Code:
    'chartboost
    AddApplicationText(<activity android:name="com.chartboost.sdk.CBImpressionActivity"
                   android:excludeFromRecents=
    "true"
                   android:hardwareAccelerated=
    "true"
                   android:theme=
    "@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
                   android:configChanges=
    "keyboardHidden|orientation|screenSize" />
                   )

    6) Go to your video interstitial ad on chartboost dashboard and click on it. Click on advanced settings dropdown. Enable " Allow Player to Skip Video " .
    All the ads will now have X on the top left or right after 3-4 seconds of video playing just like admob. If you don't do this , users will not be able to skip the video ads which will be frustrating.


    That's all. Chartboost ads will show. It may take about 2-3 hours for ads to become available.

    Please note that some of the mediation networks requires minimum sdk as 15, I can't remember if chartboost wants it too but i set minsdk to 15 for every app.

    Regards,
    Tufan
     
    Last edited: Mar 28, 2017
    ilan, inakigarm and Erel like this.
  2. sorex

    sorex Expert Licensed User

    Thanks Tufan!

    Just one question...

    How do I know if a chartboost ad shows up? does it indicate that somewhere?
     
  3. tufanv

    tufanv Expert Licensed User

    Yes, you will see a "chartboost" label with gray color at the bottom. The visuals are very different form a classic admob ad, you can also understand that way :)
     
  4. tufanv

    tufanv Expert Licensed User

    this is a screenshot for you from my app which I took seconds ago..

    [​IMG]
     
  5. sorex

    sorex Expert Licensed User

    I can see mediation requests but the impressions are still at 0. Maybe there are currently no ads for belgium.
     
  6. tufanv

    tufanv Expert Licensed User

    mediation will show request even if you do not implement the sdk. Just set the ecpm to like 10$ for chartboost and it will start to show . Wait for about 2-3 hours.

    Seeing a request in admob mediation report doesnt mean that imlementation is ok. If you see a request in chartboost dashboard then it is ok =) don't worry it takes some time according to my experience about 3 hours after everything is set.
     
  7. sorex

    sorex Expert Licensed User

    I just see a PAUSED status... apparently it won't enable ads untill you have filled in your payment info
     
  8. tufanv

    tufanv Expert Licensed User

    Yes. I entered my info long years ago so i can't remember that. After you enter the info just enable them.
     
  9. sorex

    sorex Expert Licensed User

    It seems to work but it takes ages before it does. a lot more than the 2-3 hours mentioned in this post in my case.

    so be patient.

    One annoying thing I spotted is that some ads don't have a closing buttont at the top right or inside the ads.
    You need to exit with the back key or slide down in some cases.
     
  10. tufanv

    tufanv Expert Licensed User

    I forgot to mention that sorry :) Please go to your video interstitial ad on chartboost dashboard and click on it. Click on advanced settings dropdown. Enable " Allow Player to Skip Video " .
    All the ads will now have X on the top left or right after 3-4 seconds of video playing just like admob. ( it may take some hours to take effect )
     
  11. sorex

    sorex Expert Licensed User

    I don't use videos as people mentioned they uninstall apps from the moment they get video ads.
     
  12. sorex

    sorex Expert Licensed User

    "The Chartboost SDK requires API level 9 (Android OS 2.3) or higher."

    but

    "Highly recommended: To target Android 6.0 Marshmallow features, set the project's Target SDK Version to API Level 23 in your"

    not sure what thes features are tho
     
  13. tufanv

    tufanv Expert Licensed User

    I think it may be playable ads which is a new ad mode. You can play with the interstitial ad by moving items etc
     
  14. sorex

    sorex Expert Licensed User

    I think those are animated gifs and those slide in and out effects also work on 4.0 so that ain't it either.
     
  15. tufanv

    tufanv Expert Licensed User

    You may be right I am just guessing. I don't think anything special will happen if we target 23. I couldn't see why they recommend 23, but it is a recommendation only for now.
     
  16. arastoo

    arastoo Active Member Licensed User


    Hi tufanv

    thank you soooo much for sharing this tutorial
    This is excellent ;)

    I have a request and a question.

    Can you upload your library files here?(Please)

    And is it just enough to add a library and manifest code on the basic side?

    thank you:)
     
  17. tufanv

    tufanv Expert Licensed User

    Hi :)

    yes it is enough to add the library and manifest and do required things on admob and chartboost sites.
    I cant find my files and even if i find they are old so you can find the latest adapter and jar somewhere I am sure
     
    arastoo likes this.
  18. arastoo

    arastoo Active Member Licensed User

    Thank you for your response :)

    But can not I find the file? file name are not the same!

    Code:
    #AdditionalJar: chartboost.jar
    #AdditionalJar: adapterchartboost.aar
    number3 ) should I change the file name?
    number 8 is correct ? or should I choose the file "XXX" and change its name?

    thank you:)
     

    Attached Files:

  19. tufanv

    tufanv Expert Licensed User

    yes they are the correct files. Change these lines according to this filenames you show in the pictures:

    Code:
    #AdditionalJar: chartboost.jar
    #AdditionalJar: adapterchartboost.aar
     
    arastoo likes this.
  20. arastoo

    arastoo Active Member Licensed User

    thank you:)

    I added new files and new code for friends ;)

    Code:
    #AdditionalJar: chartboost.jar
    #AdditionalJar: chartboost-7.0.1.0.aar
     

    Attached Files:

    • file.zip
      File size:
      247.6 KB
      Views:
      88
    tufanv likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice