Android Tutorial Admob Mediation With Chartboost

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

B4X:
#AdditionalJar: chartboost.jar
#AdditionalJar: adapterchartboost.aar

5) add manifest entry:


B4X:
'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:

sorex

Expert
Licensed User
Longtime User
Thanks Tufan!

Just one question...

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

tufanv

Expert
Licensed User
Longtime 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 :)
Thanks Tufan!

Just one question...

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

sorex

Expert
Licensed User
Longtime User
I can see mediation requests but the impressions are still at 0. Maybe there are currently no ads for belgium.
 

tufanv

Expert
Licensed User
Longtime 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.
I can see mediation requests but the impressions are still at 0. Maybe there are currently no ads for belgium.
 

sorex

Expert
Licensed User
Longtime User
I just see a PAUSED status... apparently it won't enable ads untill you have filled in your payment info
 

tufanv

Expert
Licensed User
Longtime User
I just see a PAUSED status... apparently it won't enable ads untill you have filled in your payment info
Yes. I entered my info long years ago so i can't remember that. After you enter the info just enable them.
 

sorex

Expert
Licensed User
Longtime 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.
 

tufanv

Expert
Licensed User
Longtime 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.

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 )
 

sorex

Expert
Licensed User
Longtime User
I don't use videos as people mentioned they uninstall apps from the moment they get video ads.
 

sorex

Expert
Licensed User
Longtime User
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.

"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
 

tufanv

Expert
Licensed User
Longtime 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

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

sorex

Expert
Licensed User
Longtime 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.
 

tufanv

Expert
Licensed User
Longtime 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.
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.
 

SMOOTSARA

Active Member
Licensed User
Longtime 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.


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:)
 

tufanv

Expert
Licensed User
Longtime 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:)
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
 

SMOOTSARA

Active Member
Licensed User
Longtime 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

Thank you for your response :)

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

B4X:
#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:)
 

Attachments

  • Capture.PNG
    Capture.PNG
    89.9 KB · Views: 575
  • Capture2.PNG
    Capture2.PNG
    77.6 KB · Views: 502

tufanv

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

B4X:
#AdditionalJar: chartboost.jar
#AdditionalJar: adapterchartboost.aar
 

SMOOTSARA

Active Member
Licensed User
Longtime User
thank you:)

I added new files and new code for friends ;)

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

Attachments

  • file.zip
    247.6 KB · Views: 468
Top