Haai5 0 Posted May 4, 2021 When creating the example app for showing a TBannerAd is in http://docwiki.embarcadero.com/RADStudio/Sydney/en/Using_the_AdMob_Service , it takes a long time before the form is opened, and no banner is shown. I have made my app exactly as in the example, except for my own BannerAd1.AdUnitID. Yes, I have set Project | Options | Application | Entitlement List | AdMob service to TRUE, and yes, I do have internet access. What am I missing? Embarcadero® Delphi 10.3 Community Edition for target Android 64bit. Share this post Link to post
Haai5 0 Posted May 5, 2021 (edited) I add some screen shots and the code. I think I did all I had to do as the example indicates? unit BannerAdTestUnit; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Controls.Presentation, FMX.StdCtrls, FMX.Advertising; type TForm1 = class(TForm) BannerAd1: TBannerAd; Label1: TLabel; procedure FormShow(Sender: TObject); procedure BannerAd1ActionCanBegin(Sender: TObject; var WillLeaveApplication: Boolean); procedure BannerAd1ActionDidFinish(Sender: TObject); private { Private declarations } ActionBeginDate: TDateTime; WastedSeconds: Integer; public { Public declarations } end; var Form1: TForm1; implementation {$R *.fmx} uses System.DateUtils; procedure TForm1.BannerAd1ActionCanBegin(Sender: TObject; var WillLeaveApplication: Boolean); begin ActionBeginDate := Now; end; procedure TForm1.BannerAd1ActionDidFinish(Sender: TObject); var Seconds: Integer; begin Seconds := SecondsBetween(ActionBeginDate, Now); WastedSeconds := WastedSeconds + Seconds; Label1.Text := IntToStr(WastedSeconds) + ' seconds wasted watching ads so far.' end; procedure TForm1.FormShow(Sender: TObject); begin if BannerAd1.AdUnitID = '' then BannerAd1.AdUnitID := 'ca-app-pub-3004682421148914~2744794599' ; BannerAd1.LoadAd end; end. Edited May 5, 2021 by Haai5 Share this post Link to post
Haai5 0 Posted May 25, 2021 SOLVED! I made a typo for the banner component name on the Google AdMob website! The banner still loads very slow, though! And the banner does not load when TestMode property is set to False. What is the purpose/effect of this property? Share this post Link to post