FMX.InAppPurchase.IFMXInAppPurchaseService.AddComponent

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure AddComponent(const Component: TCustomInAppPurchase);

C++

virtual void __fastcall AddComponent(TCustomInAppPurchase* const Component) = 0 ;

Properties

Type Visibility Source Unit Parent
procedure
function
public
FMX.InAppPurchase.pas
FMX.InAppPurchase.hpp
FMX.InAppPurchase IFMXInAppPurchaseService

Description

Adds the specified instance to the list of instances of TCustomInAppPurchase and subclasses that the platform service holds.

If you subclass TCustomInAppPurchase but you do not inherit its constructor, remember to call this method in your constructor:

constructor MyComponent.Create(AOwner: TComponent);
var
  IAPIntf: IInterface;
begin
  if TPlatformServices.Current.SupportsPlatformService(
    IFMXInAppPurchaseService, IAPIntf) then
  begin
    FInAppPurchaseService := IFMXInAppPurchaseService(IAPIntf);
    FInAppPurchaseService.AddComponent(Self);
  end;
end;

See Also