FMX.Advertising.TCustomBannerAd.CancelAction

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure CancelAction;

C++

void __fastcall CancelAction();

Properties

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

Description

Uncovers the interface of your application if an ad opened by your user is covering it.

When a user taps an advertisement banner, the ad might maximize covering the full screen. At any moment, if your application needs the user’s attention, 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();
}
Notes:
  • This feature only works on ads from the iAd service (iOS). The AdMob service (Android) does not support this action.
  • Using this action affects your revenue from advertisement. For more information, see the Apple documentation.

See Also