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

Google Admob ads are not showing

$
0
0
Hello for a few days now I have been trying to put Google Admob ads in my Android games. I do get all the dummy logs that says the ads work, but the ads never show, in the editor, using build and run, or when building and copying the apk file to my phone. Here's my code : using System.Collections; using System.Collections.Generic; using UnityEngine; using GoogleMobileAds.Api; using System; public class AdScript : MonoBehaviour { private BannerView bannerView; void Start() { string appID = "(my app ID)"; MobileAds.Initialize(appID); this.RequestBanner(); } private void RequestBanner() { string adBannerID = "(test banner ID"; bannerView = new BannerView(adBannerID, AdSize.Banner, AdPosition.Bottom); AdRequest adRequest = new AdRequest.Builder().Build(); bannerView.LoadAd(adRequest); bannerView.Show(); } } (I changed the ID, but don't worry I used the real ID in my code) Thanks a lot for any help I can get, I've been stuck on this for nearly a week now ! :)

Viewing all articles
Browse latest Browse all 1416

Trending Articles



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