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.