FMX.Advertising.ICommonAd.IsActionInProgress

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function IsActionInProgress: Boolean;

C++

virtual bool __fastcall IsActionInProgress() = 0 ;

Properties

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

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 InstanceOfICommonAd.IsActionInProgress then
      InstanceOfICommonAd.CancelAction;
end;

In C++:

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

See Also