How do I add AdMob ads using Cocoon?

Get help using Construct 2

Post » Tue May 23, 2017 2:55 am

Message: marcoscodas can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
Ok, I know there are guides out there, so don't kill me. Read me first :) Maybe I made a mistake somewhere.

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

But I get this:

Image
https://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!
B
15
S
5
Posts: 78
Reputation: 1,173

Post » Tue May 23, 2017 7:06 am

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
Image
B
28
S
7
G
1
Posts: 105
Reputation: 2,676

Post » Wed May 24, 2017 3:16 am

jaytrott86 wrote: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, @jaytrott86!

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.
B
15
S
5
Posts: 78
Reputation: 1,173

Post » Wed May 24, 2017 3:18 am

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.
B
15
S
5
Posts: 78
Reputation: 1,173

Post » Thu May 25, 2017 6:46 pm

Can nobody help? :(
B
15
S
5
Posts: 78
Reputation: 1,173

Post » Thu May 25, 2017 9:55 pm

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.
Image
B
30
S
9
G
3
Posts: 171
Reputation: 3,329

Post » Fri May 26, 2017 10:31 pm

Message: marcoscodas can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
gameglaux wrote: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 @gameglaux!

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

Am I missing something?

Thanks for your help.
B
15
S
5
Posts: 78
Reputation: 1,173

Post » Fri May 26, 2017 10:47 pm

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).
ImageImageImage
B
27
S
16
G
74
Posts: 977
Reputation: 41,673

Post » Fri May 26, 2017 11:01 pm

BackendFreak wrote: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.
B
15
S
5
Posts: 78
Reputation: 1,173

Post » Sat May 27, 2017 3:57 pm

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.
Image
B
30
S
9
G
3
Posts: 171
Reputation: 3,329

Next

Return to How do I....?

Who is online

Users browsing this forum: lordsas and 74 guests