Showing Ads When Internet Reconnects

I am using AdMob. So If I get my internet disconnected on my device, and then start my app from 0, ads don’t show up, which I understand because it couldn’t fetch any data. I have 2 questions regarding this:

  1. In my case above, how do I get the ads to show back up after internet connection is re-established without relaunching my app? 

  2. I see some apps that even though the internet is disconnected, it still shows ads (banner and interstitial). Is this because they are loaded from a cache? How do I do this?

On a different issue. Is it normal for my ad banner to close the same time as I close the interstitial ad by tapping on the “X”? Can’t I have just the full page ad closed and leave the banner open? It seems to happen on mine for some reason and thought it was a little odd.

Thanks.

In regards to number 2, interstitial ads seemed to load on an offline internet because it was already preloaded when the internet was still connected. But after it was shown and closed, it never popped back up. So I think that answered my 2nd question. The banner however is still up as it never was closed, and that was the question I had on number 3 as to why my banner ad gets closed when I close the full page ad on my app. I never called ads.hide(). 

I believe I may have found a solution to my first question too. All I had to do was to check the network connection with http://docs.coronalabs.com/api/library/network/setStatusListener.html as it goes from offline to online and flag them. When both flags are true, I reinitialize and recall the ads. Since ads.init was only called once in the main file, I had to reinitialize them in the game file, is this an ok practice?

EDIT: After reading around and testing out, it looks like even though the internet was disconnected and reconnected, without relaunching the application, I did not have to reinitialize the ads in my game file to reshow ads.

I still have my third question above. Right now, what I am doing to prevent the interstitial ad to force close my banner while offline, is to verify that the internet is offline and prevent it from launching, and only letting it show up when internet reconnects. Which even then, still closes the ad banner, but in this case, since it is online, I can just recall my banner back up again in the adlistener function. 

In regards to number 2, interstitial ads seemed to load on an offline internet because it was already preloaded when the internet was still connected. But after it was shown and closed, it never popped back up. So I think that answered my 2nd question. The banner however is still up as it never was closed, and that was the question I had on number 3 as to why my banner ad gets closed when I close the full page ad on my app. I never called ads.hide(). 

I believe I may have found a solution to my first question too. All I had to do was to check the network connection with http://docs.coronalabs.com/api/library/network/setStatusListener.html as it goes from offline to online and flag them. When both flags are true, I reinitialize and recall the ads. Since ads.init was only called once in the main file, I had to reinitialize them in the game file, is this an ok practice?

EDIT: After reading around and testing out, it looks like even though the internet was disconnected and reconnected, without relaunching the application, I did not have to reinitialize the ads in my game file to reshow ads.

I still have my third question above. Right now, what I am doing to prevent the interstitial ad to force close my banner while offline, is to verify that the internet is offline and prevent it from launching, and only letting it show up when internet reconnects. Which even then, still closes the ad banner, but in this case, since it is online, I can just recall my banner back up again in the adlistener function.