Sdkbox admob reconnect?

Hello.
If WiFi is turned on all the time - Ad showed properly (a new Ad every minute) in my (Android) app.
I want advertising to be shown in my app after user turn on WiFi. Scenario:

1.a. User turn off WiFi, and start the app;
or
1.b. User start the app (advertising may be cached, shown), and turn off WiFi;

2 My app detects, what there were no Ad cached longer than 80 seconds, and force to cache=load Ad, by calling (every 10 seconds):

3.a. sdkbox::PluginAdMob::cache(kHomeBanner);
or
3.b. sdkbox::PluginAdMob::init();

4 User turns WiFi on.

Result: no success; with “ERROR_CODE_NETWORK_ERROR” or “ERROR_CODE_NO_FILL”.

Q: How can I force to cache and show sdkbox admob Advertising after WiFi reconnect? Thanks.

We actually tested this case, if you’re using testing ads, it usually takes around 10 seconds for the Ads to comeback.

For production ads, it will take longer you’ll get NO_FILL error basically means admob don’t have ads for you.

I suspect they lower the priority of the client after couple failed ads showing attempt. it will take a while for the priority to comeback. Because their server side hooked up to a RTB(real time bidding) system which every failure gets punished. (This is just my guess based on how ad works)

I would suggest have a secondary provider to fill the gap like chartboost, inmobi etc

1 Like
  1. What method do you recommend to use (to reload Advertising manually; every X seconds): init() or cache()?
    If I use nothing - I get no Advertising after reconnect;
    Upd: recall init() by timer gives no effect i need;
  2. Do I get right - testing ads appear (after reconnect), if you don’t force AdMob with init() or cache()?
  3. How often should I call forcing method (avoiding my Ad priority to decrease)? every 70 seconds?
  4. Could we please get list of secondary Advertising providers and instructions how to use them in Cocos/SDKbox?
    Upd: Case 1a + 3a = works; after I turn off the Wifi - in some app advertising disappears, in some - not.
    Upd: Case 1b + 3a = doesn’t work, prompts “ERROR_CODE_NETWORK_ERROR”. …I wander, under what conditions I had “ERROR_CODE_NO_FILL”??
    Upd: I think I should try to set “Automatic refresh: No refresh” in apps.admob.com + refresh Ad in app manually with cache();

In SDKBOX every time you call show if there is no ads we’ll call cache for you.

I know it really works with another order: I cache Ad, and then it will be shown automatically (if caching was successful).

I’ve to set “Automatic refresh: No refresh” in apps.admob.com and after few hours it began to work: Ad appears by init(), then every 80 seconds I call cache(), but alas Ad does not refreshes in my app manually.
I’m going to roll-back everything. And I hope Ad will be shown automatically after reconnect when priority of my Ad will bi big enough.