Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: some problems with BannerAd


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 8 - Last Post: Mar 18, 2018 10:27 AM Last Post By: Eitan Arbel Threads: [ Previous | Next ]
Eitan Arbel

Posts: 508
Registered: 2/24/13
some problems with BannerAd  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 21, 2018 9:15 AM
hi

in my main form i have a BannerAd that is aligned to the bottom.
the BannerAd is set as :
AdSize:=Auto;
Align:=MostBottom;
TestMode:=True;
currently i use only the Test Code for the BannerAd.

i have 2 problems with BannerAd :
1. Hiding the MainForm is not enough to hide the BannerAd.
the BannerAd is shown in other forms, even tho i made the MainForm.Hide; and BannerAd1.Hide;
however, it does hide after some time, but sometimes immediately like the code says, and sometimes after many seconds (40-60 seconds)...

2. the BannerAd doesn't just show - it slides down from the top (at least the Test BannerAd does), even when there is already a BannerAd shown at the same place.

Thanks!
Eitan Arbel

Posts: 508
Registered: 2/24/13
Re: some problems with BannerAd  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 25, 2018 10:49 AM   in response to: Eitan Arbel in response to: Eitan Arbel
anybody can help with my problem please?
Eitan Arbel

Posts: 508
Registered: 2/24/13
Re: some problems with BannerAd  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 20, 2018 3:32 PM   in response to: Eitan Arbel in response to: Eitan Arbel
hello...?
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: some problems with BannerAd  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 20, 2018 11:07 PM   in response to: Eitan Arbel in response to: Eitan Arbel
Eitan Arbel wrote:

hi

in my main form i have a BannerAd that is aligned to the bottom.
the BannerAd is set as :
AdSize:=Auto;
Align:=MostBottom;
TestMode:=True;
currently i use only the Test Code for the BannerAd.

i have 2 problems with BannerAd :
1. Hiding the MainForm is not enough to hide the BannerAd.
the BannerAd is shown in other forms, even tho i made the MainForm.Hide; and BannerAd1.Hide;
however, it does hide after some time, but sometimes immediately like the code says, and sometimes after many seconds
(40-60 seconds)...

2. the BannerAd doesn't just show - it slides down from the top (at least the Test BannerAd does), even when there is
already a BannerAd shown at the same place.

Thanks!

One of either myself or a colleague will be having a look into this in the next couple of days, unless someone else
beats us to it ;-)

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Eitan Arbel

Posts: 508
Registered: 2/24/13
Re: some problems with BannerAd  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 21, 2018 11:27 AM   in response to: Dave Nottage in response to: Dave Nottage
One of either myself or a colleague will be having a look into this in the next couple of days, unless someone else
beats us to it ;-)

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com

Thank you very much for your reply and help Dave !

i forgot to add that i'm working on Delphi Berlin, and the app is for Android.

Thanks again
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: some problems with BannerAd  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 15, 2018 5:58 PM   in response to: Eitan Arbel in response to: Eitan Arbel
Eitan Arbel wrote:

Thank you very much for your reply and help Dave !

i forgot to add that i'm working on Delphi Berlin, and the app is for Android.

I've finally had some time to look at this, however I'm having trouble making an ad show at all. I created an ad unit
and have the ID, which I'm assigning thus:

constructor TfrmMain.Create(AOwner: TComponent);
begin
  inherited;
  BannerAd1.AdUnitID := 'ca-app-pub-XXXXXXX/XXXXXX'; // actual numbers redacted
  BannerAd1.LoadAd;
end;


This is using Delphi 10.2 Tokyo Release 3

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Eitan Arbel

Posts: 508
Registered: 2/24/13
Re: some problems with BannerAd  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 16, 2018 10:03 AM   in response to: Dave Nottage in response to: Dave Nottage
Thank you for your reply Dave !

from what i saw, the BannerAd1.AdUnitID should be in the OnCreate, and the BannerAd1.LoadAd; should be in the OnShow of the form.

at least, that's what worked for me, but with my question's problems.

Thanks !
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: some problems with BannerAd  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 16, 2018 2:28 PM   in response to: Eitan Arbel in response to: Eitan Arbel
Eitan Arbel wrote:

at least, that's what worked for me, but with my question's problems.

I managed to make mine work eventually. I was unable to reproduce the problem of the banner ad staying visible, so
perhaps you could list the full steps of how to do that? I did however notice that it does not respect the parenting to
another control. It seems to be OK when it is parented to the form.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Eitan Arbel

Posts: 508
Registered: 2/24/13
Re: some problems with BannerAd  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 18, 2018 10:27 AM   in response to: Dave Nottage in response to: Dave Nottage
Thank Dave !

there really isn't anything special i do there.

i set AdUnitID in the OnCreat of the form (currently using a code for testing), and Load in the OnShow.
the BannerAd is placed on the Form, not in a control, and is Align:=MostBottom;, TestMode:=True; and AdSize:=Auto;

that's it. nothing special or different then the default except that

Thanks again.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02