[SOLVED] Admob or any ad services for cocos2d-js

Are there any ways to add ad services to my cocos2d-js game?

1 Like

Admob is intergated with cocos2d-js v3.0 you can check plugin-x module for the same

here’s the link there
http://cocos2d-x.org/docs/manual/framework/html5/jsb/plugin-x/how-to-use-plugin-x-on-android/en

which help you add flurry smilarly you can add admob to it.

if you face any setup issue let me know will guide you through it

1 Like

Thank you for the help and i will surely let you know if i run in any problem.
I did the facebook one, so i am going to do admob today.
Quick question, which is better flurry or admob?

I prefer admob over flurry …

Ok thanks for info.
So i do all the setup for the admob, but it keep saying that the plugin isn’t defined.
what could be the problem?

Did you add this in runtime-src/Classes/AppDelegate

if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #include “jsb_cocos2dx_pluginx_auto.hpp” #include “jsb_pluginx_extension_registration.h” #endif

and also check if your loading the following plugin script or not

Yes i did the header thing.
but how do u load in the plugin script?
Is it this way

#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
    sc->addRegisterCallback(register_all_pluginx_protocols);
    sc->addRegisterCallback(register_pluginx_js_extensions);
#endif

also anything i use the gameDevGuide.sh, i always run in some problems.
Either module already defined or so some spidermonkey functions are not referenced.

The plugins are not updated , you have to add admob plugin by your own , I am coming soon with the blog maybe I will write this weekend and share it with you

1 Like

Thank you. That would be great.

Hi,
Have you already posted this blog?
thanks.

If you end up writing this blog, it will be very popular. I need to know how to install admob because all my current attempts have failed

shirkan, did you encounter any “ReferenceError: plugin is not defined” when you were doing your admob implementation?

I am using JS3.2 and Cocos IDE 1.1.0

Just wrote a tutorial on android IAP using plugin-x http://smitsuchak.blogspot.in/2015/01/google-in-app-purchases-integration-for.html

Follow the steps and just load plugin adMob , if not I am updated blog for admob by tomorrow will surely help

Fantastic. I eagerly await your admob updated plugin tutorial. Thank you sanghai!

Im not using cocos2d anymore for my projects.
Sorry and thanks for trying to help.