How to add Vungle Plugin to Cocos Creator?

I created my project on cocos creator. and i want add vungle ads to my project . How to add vungle ads to my project on cocos creator ? Its so easy on Cocos 2dx but now i cant find . Please can someone show me ?

hello @mertakman,

for Vungle(or any SDKBOX plugin) you have to first build the project using cocos creator and then follow the steps mentioned in SDKBOX documentation http://docs.sdkbox.com/en/plugins/vungle/v3-js/ .

you will now find “sdkbox_config.json” inside “PROJECT/jsb-default/res” edit that to fill your ads ID and all, and then copy that .json , now go to cocos creator and edit your scripts for “sdkbox.PluginVungle.init();” and then build the project form creator again.

after building is complete you got to the “PROJECT/jsb-default/res” and you will find that “sdkbox_config.json” is missing. now all you have to do is to past"sdkbox_config.json" which you have copied earlier in “PROJECT/jsb-default/res” and build with cocos command line interface for that you have to follow the following steps.

  1. open cmd/terminal and cd to “jsb-default”.
  2. now run command " cocos compile -p android 23 -m’debug’ "

and you will have .apk file when it is done

let me know if you have any difficulties…

NOTE: don’t use double quotes

4 Likes

iap demo https://github.com/yinjimmy/ccc_iap_demo

so cool! i will try it later.

Hey @Undercode,

For the second part of your steps, do you have to compile the Creator project using cocos command line interface? Will it not work if you compile the project within Creator?

hey @efares

it wont work if you compile with creator only, as creator while compiling removes sdkbox_config file form res folder.

so to compile the game logic code you have to use creator, then past the sdkbox_config file back and then build with cocos console

if any questions feel free to ask back :smiley:

1 Like

Thanks for the reply @Undercode

I think Creator and SDKBOX will be coming out with a more convenient integration process in the next week or two. I think I’ll just wait for that update release.

Thanks for your help!

1 Like

Why did you have 23 in there?
And for release apps, should I use release instead of debug?

1 Like

@Undercode
My app stopped opening on Android after using sdkbox import 'plugin'
I had installed Flurry Plugin and followed the Integration Guide.

It worked on iOS, I can see statistics from my iPhone but not on Android. Am I missing something I am supposed to do for Android?

Any help would be appreciated.
Thanks.

What’s the error message?

23 is the android version

yes you should use release instead of debug for releasing app