Problem with latest SDK box

Hello

I just returned to my project because I was busy for the last few months and was waiting for the Cocos Creator update. Well, I updated to Cocos Creator 1.8.1 from 1.6.1 or 1.7.1 (can’t remember) and noticed some weird things going on with SDK box. I installed IAP, Admob and Ratings & Reviews in SDK box. Now the sdkbox_config.json file is all weird. I have:

Google Analytics
Youtube
Facebook
UnityAds
Appodeal
SdkboxAds
Fyber

and much more…

To make sure “I” didn’t do something wrong I created a test Cocos Creator project and added the SDK box plugins and got the same config file.

I honestly hope all these plugins aren’t going to be installed when I build my project because I don’t want them. They would make my APK size larger than needed. I also don’t want Google Analytics tracking usage on accounts which don’t belong to me.

I know that in the older Cocos Creator application, SDK box didn’t work like this and personally I don’t like it this way. It’s disappointing me big time.

Can someone tell me if all these plugins will get installed?

Is Google Analytics necessary? Is SDKBox Ads necessary for Admob?

What should I do with this?

 "SdkboxAds": {
            "units": [
                "AdColony", 
                "AdMob", 
                "Chartboost", 
                "Appnext", 
                "UnityAds"
            ], 

Also I noticed this:

"AdMob": {
            "test": false, 
            "testdevice": "FE20924C46522E2E204587EB339897C6,kGADSimulatorID", 
            "cache": {
                "gameover": true
            }, 

I used to cahce Admob interstitial ads in my JS code, should I remove caching and let SDK box cache the ads automatically?

I can’t believe things changed so much in just a few updates…

You can continue to use Plugin AdMob as before.

remove the testdevice and cache field.

What about all those plugins which are written in the config file? Youtube, Google Analytics, Unity ads etc.

The config is from Plugin SDKBoxAds, from 2.3.17.7, when you import AdMob, it also import SDKBoxAds.

1 Like

They won’t affect your game anyway

Thank you for replying. I was anxious because I need to finish the game. So should I remove from the config file the plugins I don’t need? Like Youtube, Analytics etc. Also will these plugins get installed in the APK? Such as Unity ads, Youtube, Facebook etc? I don’t need any of those plugins other than the 3 I mentioned.

Also should I leave SDKbox Ads like this if I am not using anything but Admob.

"SdkboxAds": {
            "units": [
                "AdColony", 
                "AdMob", 
                "Chartboost", 
                "Appnext", 
                "UnityAds"
            ],

No, these plugins wont be installed. and it’s fine to remove sdkboxads config.

1 Like

Ok, thank you. Then I will remove from the config SdkboxAds and things I don’t plan to use such as Google Analytics, Youtube, Facebook etc. Personally, this is the first time that I’ve decided to use an application for my apps. I decided to use Cocos because it is open source and has many coding languages which you can use. I need to go native because of the high FPS which I need.

However, I just don’t want to install things that take up unnecessary space which is why I got disappointed when I saw all those plugins in the config file. Personally, I like Cocos but I also need to use SDK box for monetization and other plugins which are not built into the Cocos Creator. If I experience problem with SDK box, I might need to write my own plugins for Admob, Reviews and IAP. I will either way examine the final APK prior to releasing the app.

Ok, I have checked the APK and only the SDK Box plugins which I specified were installed in the final APK. In other words, the rest of the plugins which were specified in the config file were not included. I was just worried about size. However, I should have just created an APK and checked things prior to posting in the forum but I got a more detailed idea this way of how things work as far as the config file is concerned.

only one thing to notice, you need to add bellow code to your AppDelegate.cpp:

#ifdef SDKBOX_ENABLED
#include "PluginAdMobJS.hpp"
#include "PluginAdMobJSHelper.h"
#endif
#ifdef SDKBOX_ENABLED
se->addRegisterCallback(register_all_PluginAdMobJS);
se->addRegisterCallback(register_all_PluginAdMobJS_helper);
#endif
1 Like

Yes, I’ve checked the AppDelegate.cpp file because I read the SDK Box docs and saw that those lines are already included. I use Cocos Creator and maybe this is why… I am basically a developer which works with web languages (Javascript, PHP, HTML etc.) but lately have worked with Swift as well. I’ve made Android apps but never fully native. I’ve decided to start using Cocos and so far I like it a lot but my game still needs to be released so I will see how things go once it’s released. So far I am impressed with the FPS of the game because of it being native even though it uses Javascript bindings. Cocos FPS in Android is very high even on older devices. Apple is always pretty fast though. SDK box is also great because it’s convenient. I don’t want to write a long story but want developers which question this application to know that it is very helpful.

This is from my AppDelegate.cpp

USING_NS_CC;
#ifdef SDKBOX_ENABLED
#include “PluginReviewJS.hpp”
#include “PluginReviewJSHelper.h”
#endif
#ifdef SDKBOX_ENABLED
#include “PluginIAPJS.hpp”
#include “PluginIAPJSHelper.h”
#endif
#ifdef SDKBOX_ENABLED
#include “PluginAdMobJS.hpp”
#include “PluginAdMobJSHelper.h”
#endif

and…

#ifdef SDKBOX_ENABLED
se->addRegisterCallback(register_all_PluginReviewJS);
se->addRegisterCallback(register_all_PluginReviewJS_helper);
#endif
#ifdef SDKBOX_ENABLED
se->addRegisterCallback(register_all_PluginIAPJS);
se->addRegisterCallback(register_all_PluginIAPJS_helper);
#endif
#ifdef SDKBOX_ENABLED
se->addRegisterCallback(register_all_PluginAdMobJS);
se->addRegisterCallback(register_all_PluginAdMobJS_helper);
#endif