Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. Haai5

    BannerAd doesn't load

    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.
  2. Haai5

    BannerAd doesn't load

    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.