Quantcast
Channel: Questions in topic: "ads"
Viewing all articles
Browse latest Browse all 1416

Android Banner disappears after touching the screen

$
0
0
So I made a dice app with unity and I am trying to display a banner at the bottom. It used to work fine until an update that had nothing to do with the ad and then the ad started disapearing when I touch the screen, here's a 10 second video of the disappearing ad: https://www.youtube.com/watch?v=fICWqi22Rf8&feature=youtu.be And here's the code for the advertisment private BannerView bannerView; void Start() { string appId = "..."; MobileAds.Initialize(appId); RequestBanner(); } private void RequestBanner() { #if UNITY_ANDROID string adUnitId = "..."; #elif UNITY_IPHONE string adUnitId = "..."; #else string adUnitId = "unexpected_platform"; #endif // Create a 320x50 banner at the top of the screen. bannerView = new BannerView(adUnitId, AdSize.SmartBanner, AdPosition.Bottom); // Create an empty ad request. AdRequest request = new AdRequest.Builder().Build(); // Load the banner with the request. bannerView.OnAdLoaded += HandleOnAdLoaded; bannerView.LoadAd(request); } public void HandleOnAdLoaded(object sender, EventArgs args) { bannerView.Show(); }

Viewing all articles
Browse latest Browse all 1416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>