Sdkbox::admob multiple banners issue

Hi,

I’m attempting to load multiple admob banners in my game. Problem is that I only get the last one I try to cache.

I’ve in AppDelegate.cpp

    bool AppDelegate::applicationDidFinishLaunching() {
    .....
    #ifdef SDKBOX_ENABLED
    	sdkbox::PluginAdMob::init();
    	sdkbox::PluginReview::init();
            sdkbox::PluginAdMob::cache("banner1");
            sdkbox::PluginAdMob::cache("banner2");
            sdkbox::PluginAdMob::cache("banner3");
    #endif
    ....
}

And in the update() method of the scene 1/2/3 (each banner is assigned to one scene), I’ve:

    .....
    #ifdef SDKBOX_ENABLED

    if (sdkbox::PluginAdMob::isAvailable("banner1")) // or banner2 / banner3 depending on scene
    {
	sdkbox::PluginAdMob::show("bannerContinueScene");
    }
    #endif
    ....
}

But when I run my project, the only banner I can see is the last one I attempted to cache(), in this case would be “banner3”, and it’s as if sdkbox couldn’t cache ‘banner1’ & ‘banner2’ or they were uncached when attempting to cache ‘banner3’.

If I reorder the cache() calls in didFinishLaunching, the banner displayed (in respective scene) is the one that shows then.

The Admob part in my sdkbox_config.json is:

"AdMob": {
            "test": false, 
            "ads": {
                "banner1": {
                    "width": 320, 
                    "type": "banner", 
                    "id": "ca-app-pub-BUNCH-OF-NUMBERS AD 1", 
                    "alignment": "bottom", 
                    "height": 50
                }, 
                "banner2": {
                    "width": 320, 
                    "type": "banner", 
                    "id": "ca-app-pub-BUNCH-OF-NUMBERS AD 2", 
                    "alignment": "bottom", 
                    "height": 50
                }, 
                "banner3": {
                    "width": 320, 
                    "type": "banner", 
                    "id": "ca-app-pub-BUNCH-OF-NUMBERS AD 3", 
                    "alignment": "bottom", 
                    "height": 50
                }
            }
        }

just only one banner right now.

Any plan to change this in future?

Does this apply to other AD plugins too, or just admob?

Thanks

Hey @ishmar

I will add a task to our list.
will let you know on any update about it in the same thread.

You mean only one AD cached !!
Yes, both admob and appnext has one banner ATM.

Best,
Pabitra

Thanks for your support, as I’d prefer having all banners preloaded from beginning. I plan to use different banner sizes on game and menus screen, and having a simple menu (yes/no) screen means sometimes ad won’t be shown if I have to wait till it’s cached.