Search Unity

Does the Advertisement.isShowing Only Check The Showing Of video/rewarded video Ads?

Discussion in 'Unity Ads & User Acquisition' started by AtillaTheDev, Jul 10, 2020.

  1. AtillaTheDev

    AtillaTheDev

    Joined:
    Apr 30, 2020
    Posts:
    10
    Hello everyone,


    I have some questions about UnityAds bannerAd (on an Android Game in development process):

    1-) As far as I tested the build of my game on my android phone, the Advertisement.isShowing does not return true, even if bannerAd is displayed on the screen and the internet connection of my phone is on. So, does this Advertisement.isShowing only check the showing of video/rewarded video ads and not the bannerAds? May anybody confirm that?

    2-) What is your way to implement bannerAd considering some scenarios?

    For example: If the user turns the internet connection of device on and off on some periods, what is your logic to keep your bannerAd live as far as possible?

    3-) How do you control whether the bannerAd live or not?

    4-) Do I have problems If I call the Advertisement.Banner.Show method one after another on certain periods, for example once a minute?
     
    hasanaltas likes this.
  2. kyle-unity

    kyle-unity

    Unity Technologies

    Joined:
    Jan 6, 2020
    Posts:
    336
    1) That's my understanding yes, Advertisement.isShowing is only if a fullscreen video ad is currently showing or not.

    2) The Unity Ads SDK caches content whenever possible so it shouldn't be disrupted by a brief connection break.

    3) You can hide and show banners whenever you like.

    4) The banners automatically refresh so you don't need to keep calling Advertisement.Banner.Show. It will periodically update with a new banner.
     
    AtillaTheDev likes this.
  3. AtillaTheDev

    AtillaTheDev

    Joined:
    Apr 30, 2020
    Posts:
    10
    Thank you for the answers.

    I need something more to be clearified.

    Regarding to Answer 4, banner ads automatically refresh if there is internet connection continuously.(Please correct me if I am wrong.) What if internet connection of device periodically turns on and off on and off?

    As far as I know, If UnityAds could not be initialized with the "Advertisement.Initialize" method because of some reason (no internet connection on the device for example), the "Advertisement.Initialize" method continues to try to initialize the ads in certain periods, then if the device internet connection is turned on, the mentioned method initializes the ads, so it is enough to call the "Advertisement.Initialize" method once in the script.

    My question is that:
    Does the "Advertisement.Banner.Show" method works with the same logic as the "Advertisement.Initialize" method.
    Namely, if I call the "Advertisement.Banner.Show" method once in my script, will it continuously check the availability of showing banner ads regarding to internet connection issues of devices?

    Sample Case:
    User started to play the game when his internet connection is on, UnityAds initialized and bannerAd started to show with the only one "Advertisement.Banner.Show" call at the beginning of the game. After 5 minutes, the user turned the internet connection off, and then, after 10 minutes, he turned the internet connection on.

    In this case, after 15 minutes passed from the user started the game and internet connection turned on again, will the Advertisement.Banner.Show method that I called at the beginning of the game start to show fresh bannerAds again with a connection with the ad server
    OR
    Should I detect the internet connection disruption with some way and after that, call the "Advertisement.Banner.Show" method again after connection is turned on again?
     
  4. kyle-unity

    kyle-unity

    Unity Technologies

    Joined:
    Jan 6, 2020
    Posts:
    336
    That's a really good question so I decided to test it myself. When you disconnect, the last banner will persist for the duration, and looks like the SDK will detect the availability of your connection and resume with new banners once the device is reconnected.

    So you should be able to just call Advertisement.Banner.Show once and the SDK will handle the rest.
     
  5. AtillaTheDev

    AtillaTheDev

    Joined:
    Apr 30, 2020
    Posts:
    10
    Thank you so much!
    Love Unity!
    Love Unity Technologies Teams!
     
    hasanaltas and kyle-unity like this.