FMX.Advertising.TCustomBannerAd.IsActionInProgress

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function IsActionInProgress: Boolean;

C++

bool __fastcall IsActionInProgress();

Properties

Type Visibility Source Unit Parent
function public
FMX.Advertising.pas
FMX.Advertising.hpp
FMX.Advertising TCustomBannerAd

Description

Indicates whether the interface of your application is currently covered by an ad opened by your user (True) or not (False).

When a user taps an advertisement banner, the ad might maximize covering the full screen. This function lets you check whether or not this is the case.

At any moment, if your application needs the user’s attention, you can call IsActionInProgress to check whether or not there is an ad covering your application and, if there is, you can call CancelAction to uncover your application:

In Delphi:

procedure TForm1.NewMessageRequiresUsersAttention(Sender: TObject);
begin
    if MyBannerAd.IsActionInProgress then
      MyBannerAd.CancelAction;
end;

In C++:

void __fastcall TForm1::NewMessageRequiresUsersAttention(TObject *Sender)
{
    if (MyBannerAd->IsActionInProgress())
        MyBannerAd->CancelAction();
}

See Also