bannerView = new BannerView(adUnitId, AdSize.SmartBanner, AdPosition.Top);
bannerView.LoadAd(request);
| return new AdRequest.Builder() | |
| .AddTestDevice(AdRequest.TestDeviceSimulator) | |
| .AddTestDevice("0123456789ABCDEF0123456789ABCDEF") | |
| .AddKeyword("game") | |
| .SetGender(Gender.Male) | |
| .SetBirthday(new DateTime(1985, 1, 1)) | |
| .TagForChildDirectedTreatment(false) | |
| .AddExtra("color_bg", "9B30FF") | |
| .Build(); |
AdRequest request = new AdRequest.Builder().Build();#if UNITY_EDITOR
string adUnitId = "unused";
#elif UNITY_ANDROID
string adUnitId = "ca-app-pub-3940256099942544/1033173712";
#elif UNITY_IPHONE
string adUnitId = "ca-app-pub-3940256099942544/4411468910";
#else
string adUnitId = "unexpected_platform";
#endifWhat is the difference between an appId and adUnitId?
Please explain the bannerView.LoadAd(request);
Do I require .AddTestDevice(AdRequest.TestDeviceSimulator)??
Do I require .AddTestDevice("0123456789ABCDEF0123456789ABCDEF")??
where do I get the string value for my test device?
I/Ads: Use AdRequest.Builder.addTestDevice("33BE2250B43518CCDA7DE426D04EE232")to get test ads on this device.
Do I require .AddKeyword("game")?
AdRequest request = new AdRequest.Builder().Build();
Why is the code block repeated so many time (once for banner ads, once for interstitial ads, once for native ads and again for rewarded ads.
Can I place this code block in the Start() method.?
Do I need to have a different adUnitId for each of the Ad Types(banner, rewarded, interstitial and native)?
this.bannerView.LoadAd(this.CreateAdRequest())this.bannerView.Show();1. To get the string value of my Android test device. Where do I find the logCat output?
2. For a banner Ad. What would be the typical actions to take for the various callbacks (HandleAdLoaded, HandleAdFailedToLoad, HandleAdOpened, HandleAdClosed, HandleAdLeftApplication)
I am inclined to do nothing for all of these. In fact I can't think of anything that I should do as the game developer / publisher for any of these. However please advise of what is typically done so that I can learn more about banner Ads and learn more about what other people may be doing
When I call "this.bannerView.LoadAd(this.CreateAdRequest())Does this just load the Ad in the background or does it also Show the Ad?
I seem to be getting the test Ads to Show even though I have not calledthis.bannerView.Show();Why would that be happening?
bannerView.Destroy();
when I exit my game?1. Do I have to callbannerView.Destroy();when I exit my game?
2. If the banner Ad fails to load, does anything get shown at the spot on the screen where the banner Ad
was to be shown? (ie does any kind of black background or anything like that show up?) or will my entire
game screen be shown? Just asking in case I need to do anything in the "HandleAdFailedToLoad" call back.
3. If the banner Ad fails to load, does it keep trying to load an Ad automatically?
Will the production Banner Ads have an "x" so that a player can close the banner Ad?