How do I add AdMob ads using Cocoon?

0 favourites
From the Asset Store
[C3] Banner ads, Interstitial ads, Rewared video ads, Rewarded Interstitial Ads
  • Ok, I know there are guides out there, so don't kill me. Read me first <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /> Maybe I made a mistake somewhere.

    I followed this: shatter-box.com/knowledgebase/c ... #cocoonads

    But I get this:

    imgbb.com image hosting

    It did say to install "Atomic Plugins" but... do I do that in the construct 2 side of things, or the Cocoon side of things?

    I have my IDs and everything, but I can't seem to get stuff to work. Everything else is so well documented in Construct 2, except for ad implementation.

    I can't seem to find up to date information on this.

    My product is almost ready to go, and I need to implement the ads before going further with it.

    I already have the google developer account and have been publishing to beta for about a week.

    Please help me? <3

    Thanks!

  • You won't see the ads on preview, you need to build your game and test it on the Cocoon developer app, you should test with the Admob test Ids too

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You won't see the ads on preview, you need to build your game and test it on the Cocoon developer app, you should test with the Admob test Ids too

    Thank you for your reply, !

    However, as you can see, it's not that I'm not seeing the ads, it's that there's an error when trying to launch the game, both on the PC and the APK. I tried running the APK that compiled following these directions and it hangs on the layout which is supposed to load the ad.

    Not sure if the plugin is not running correctly, if I haven't set things up properly... there are two AdMob plugins: one that is included ( said to be working with Intel XDK -which is deprecating its compiler in a couple of weeks) and the Cocoon Ads plugin, which is what I'm using for this example and which gives me the error above on the computer, and a hang on the phone.

    Any ideas of what I might be doing wrong?

    I'm using the test ads as per AdMob's suggestions, and I know they won't show until published to the Play Store.

  • Just as a sidenote: the guide for using Cocoon Ads plugin says I must be using Atomic plugins, but it doesn't say where to put them or how to implement them (in Construct 2? In Cocoon?).

    It may or may not be that, but that's the only thing that seems to not follow the guide by Shatter Box.

  • Can nobody help?

  • Remove all ad plugins from your project.

    Install latest cocoon plugins into C2:

    https://github.com/CocoonIO/cocoon-plug ... master.zip

    Add the cocoon Admob plugin to your c2 project. Fill in the admob ids in the plugin settings. Put your admob events somewhere in your project. Export project. Upload to cocoon.io. Turn on admob in cocoon.io services. Make sure the 'admob native ads for android' is in the plugin settings. Compile apk.

  • Remove all ad plugins from your project.

    Install latest cocoon plugins into C2:

    https://github.com/CocoonIO/cocoon-plug ... master.zip

    Add the cocoon Admob plugin to your c2 project. Fill in the admob ids in the plugin settings. Put your admob events somewhere in your project. Export project. Upload to cocoon.io. Turn on admob in cocoon.io services. Make sure the 'admob native ads for android' is in the plugin settings. Compile apk.

    Thank you !

    Sadly, it still didn't work. Here's what I did:

    1. Removed all ad plugins.

    2. Closed C2.

    3. Installed new Cocoon plugins.

    4. Added Cocoon ads plugin to my project.

    5. added the "Load Banner Ad", "Show Banner Ad" and "Set Banner Position" actions to my "At start of Layout" event on the layout I wanted the ad to show. Set position to 0,0 just to test (don't care where it shows as long as it shows for the test). Used Google's test IDs.

    6. Exported Cordova.

    7. Updated source code in Cocoon project

    8. Activated Ad module, turning on AdMob.

    9. Added the native Admob Android plugin and the one for iOS just in case.

    10. Compiled APK

    11. Uploaded ARM7 version to Google Play store as Beta

    12. Downloaded new update.

    Ads not showing.

    At least I don't get a black screen anymore, but I don't get any ads, either <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad" />

    Am I missing something?

    Thanks for your help.

  • Have you deleted "config.xml" file after you exported to Cordova? It overrides the Cocoon.io config setup (so also removes the AdMob Cocoon plugin inclusion).

  • Have you deleted "config.xml" file after you exported to Cordova? It overrides the Cocoon.io config setup (so also removes the AdMob Cocoon plugin inclusion).

    Hm, let me check.

  • Are you using success/failure events? I would make the app indicate the status of the ad events to see if thats where the problem is. You can remove them after testing. Or use run the app through the cocoon dev app and use the console.

  • Have you deleted "config.xml" file after you exported to Cordova? It overrides the Cocoon.io config setup (so also removes the AdMob Cocoon plugin inclusion).

    I had an old config.xml file there, apparently. But even creating a new project on Cocoon from scratch and making sure I had the right config file there didn't help.

    I exported the APK and sent it to my Play Store beta, downloaded it on my phone and still no joy

  • Are you using success/failure events? I would make the app indicate the status of the ad events to see if thats where the problem is. You can remove them after testing. Or use run the app through the cocoon dev app and use the console.

    I'm not, I'm just using simple implementation to show the ads.

    Honestly, I haven't been this frustrated developing the game since I started Kinda sucks. I'm about to give up on the ads thing, if I'm honest.

  • You definietely should not give up on this as this is a trivial issue for sure.

    This error pops up whenever you try to execute an action of Cocoon plugin (not the C2 plugin but the Atomic one on Ludei side). So for instance the below example shows how you avoid this error popup to be able to work on localhost.

    This error should not pop up after you make an APK with Cocoon if you install the right plugin in Cocoon admin panel.

    So I am pretty sure it's the issue with your setup. If you keep on having issues I strongly recommend to buy Quick Starter - Ebook by It's very good ebook that explains everything Cocoon related in details step by step and it costs just few bucks.

  • You definietely should not give up on this as this is a trivial issue for sure.

    This error pops up whenever you try to execute an action of Cocoon plugin (not the C2 plugin but the Atomic one on Ludei side). So for instance the below example shows how you avoid this error popup to be able to work on localhost.

    This error should not pop up after you make an APK with Cocoon if you install the right plugin in Cocoon admin panel.

    So I am pretty sure it's the issue with your setup. If you keep on having issues I strongly recommend to buy scirra.com/store/ebooks/quick-starter-ebook-1893 Quick Starter - Ebook by It's very good ebook that explains everything Cocoon related in details step by step and it costs just few bucks.

    Thanks for the reply, !

    That error is gone now, actually. I'm compiling with Webview+ as Canvas+ gives odd graphic glitches on some devices. Webview+ is more predictable and more stable (though much slower.. thankfully my game isn't demanding).

    After the steps I posted a couple of posts ago, everything runs fine, but ads don't load.

    I'll look into the ebook, thanks!

  • Hi marcoscodas

    if you use webview+ make sure to use "System -> is on platform cordova" instead of "Is canvas+". Latter only is true if your game uses the canvas+ engine. However "is on platform cordova" is true on both, webview and canvas+.

    Thanks for referring to my ebook

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)