Chartboost Mobile Ads (Not Updated)

rob1221

  • *
  • Posts: 9472
1. Set up your Chartboost account and add your app to it by going to Apps > Add App.  If you're using this extension for both iOS and Android, you need to make a separate app entry for each.

2. Add a publishing campaign by going to Campaigns > Add Campaign > Publish in the Network.  Ignore InPlay (still in beta I think), but you can choose any of the other 4 options.

3. To add the extension to your game, you can either unzip and move the attached extension folder into engine-extensions in your workspace, or you can go to Settings > Extensions > Install Extension.

4. Go to Settings > Extensions, enable the Chartboost extension, and then close and reopen the game.

5. In your first scene, use the Start Chartboost with App ID: ____ App Signature: ____ block with the App ID and App Signature from your app on the Chartboost website.  If you're using this extension for both iOS and Android, you may need to use one of the blocks under Flow > Advanced > Platforms so that the correct information is used on each platform.

6. (optional) At this time you can also use the Enable Startup Ads for ____ block that will cause ads to show up every time the app is opened.

7. (optional) Event listeners are supported for some events such as successful ad display and failure to load.  If you put standard blocks inside of the Add Event Listener ____ for Chartboost block, make sure to use the Remove Event Listener ____ for Chartboost block before transitioning to another scene.

8. Unless you're only showing the ad at the start of the game, you'll want to use one of the cache ad blocks earlier to reduce the loading time of the ad.

9. Decide where you want to show your ads using one of the show ad blocks.

10. If updating your extension version, go to Run > Clean Project after updating to avoid potential problems with code changes.

Q: Why don't I see ads?
A: There are a few possible reasons, but by far the most common reason is that you aren't using test ads, and Chartboost has run out of ad inventory to show you.  This can happen easily if you are outside the US or UK.  Rewarded video for Android seems to have a low fill rate.

Thanks to:
out2lunch -- fixed a problem with third party iOS libraries.
JasonIrby -- initial delegate and more apps implementation
GeorgeN -- fixed a problem with including the iOS SDK in V2.
zmijat -- helped add the "is ___ cached" block
Max Finch -- added event to check if an interstitial is closed and updated SDK
aljosa -- updated Chartboost SDK for version 9

Chartboost V11
  • Updated iOS SDK to v6.6.2 and fixed compiling issue
  • Updated Android SDK to v6.6.3
  • Removed all uses of "more apps" as Chartboost is no longer supporting it
  • Added location options for all relevant blocks and marked some older blocks as deprecated (but they still work for now)

Chartboost V10
  • Note: This version may not work properly on Xcode 8.
  • Updated iOS SDK to v6.5.1 [iOS 6 is no longer supported.  Set your minimum version to 7 or higher.]
  • Updated Android SDK to v6.5.1

Chartboost V9
  • Updated iOS SDK to v6.4.0
  • Updated Android SDK to v6.4.0
  • Added blocks for interstitial at custom locations

Chartboost V8
  • Updated iOS SDK to v6.2.0
  • Updated Android SDK to v6.2.0

« Last Edit: October 21, 2019, 03:08:31 pm by rob1221 »

sandsoftimer

  • Posts: 316
Thanx both of you.
iOS ->          

Android ->
iOS -> Bubble Tapping
 Android -> Bubble Tapping

FortySe7en

  • Posts: 304
Thanks a lot!
I'll buy you a beer if you show up in London :)
EDIT: Works on iOS, thanks again!
PS: Make sure you have a very fresh stencyl build !!

« Last Edit: September 08, 2013, 04:38:09 pm by FortySe7en »

Innes

  • *
  • Posts: 1960
Thanks for your efforts on this (and to those who helped to get this extension up and running).


It's much appreciated.
Visit www.TheStencylBook.com - the only published book for learning Stencyl.

GeorgeN

  • Posts: 856
I have some working Chartboost for Android the only ugly thing is that you have to replace something in "include.nmml" for every project.

http://community.stencyl.com/index.php/topic,24289.msg139619.html#msg139619

I was looking to use something like ::APP_PACKAGE:: to get the current package.


rob1221

  • *
  • Posts: 9472
You may have to edit the file that interprets the .nmml.  I don't know which one that is though.  Maybe out2lunch has an idea?

GeorgeN

  • Posts: 856
But dunno this approach is not ok. To have an extension that replace MainActivity.java.If you have another extension that it does the same thing what will happen?

I've made also another form of Chartboost extension with "run on ui thread" method but i don't remember if it really works. I will look again through it and i will share it.

FranAlt

  • Posts: 169
Awesome, it works! Thank you guys!

One thing, is it possible its not working on 4 inch screens? Like the iPhone 5?
Swipe - FREE          Cloud Run - FREE              
                                  
         iOS                                Android
    Android

rob1221

  • *
  • Posts: 9472
I works in the iPhone 5 simulator, and I don't see why it wouldn't work on the device.  Someone with that phone can confirm though.

FranAlt

  • Posts: 169
I was reading http://stackoverflow.com/questions/15999012/chartboost-behaving-weird-ios and it says it only shows up ads every 24 hours in each device.

Are all the devices of the simulator the same device? Because that may be it
Swipe - FREE          Cloud Run - FREE              
                                  
         iOS                                Android
    Android

rob1221

  • *
  • Posts: 9472
Live ads on devices are restricted in that the same ad can't be shown more than once a day per user.  The simulator is considered a test device and does not have that restriction.

FortySe7en

  • Posts: 304
Just to confirm, I have ads working on both iPhone 5 and iPad 3.
Both work correctly, I'll get an add every app launch, sometimes I get more ads displayed (I ask for this, but don't get them always, that might be because chart boost puts some limits on ads to prevent spamming/bot ad harvesting).
I'm not using any 'test' stuff, all 'live'.

FortySe7en

  • Posts: 304
Stupid me, I have no network at home (configured in that iPad), that's why I see no ads on it.

« Last Edit: September 12, 2013, 06:25:39 am by FortySe7en »

JasonIrby

  • Posts: 290
Awesome work on this extension for IOS.  It's a very important capability add-on.

Are there still plans for an Android version?  Hope so!

-Jason
 

rob1221

  • *
  • Posts: 9472
I figured out the Android part of the extension, so that has now been added.