System.Notification.TCustomNotificationCenter.PlatformInitialize

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure PlatformInitialize; overload;
procedure PlatformInitialize(const ApplicationName: string); overload;

C++

void __fastcall PlatformInitialize()/* overload */;
void __fastcall PlatformInitialize(const System::UnicodeString ApplicationName)/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.Notification.pas
System.Notification.hpp
System.Notification TCustomNotificationCenter

Description

Ensure the platform initializes to operate notifications as expected.


PlatformInitialize creates an application shortcut file in the Start Menu/Programs folder, in the case, it is not present already. The procedure associates the application with the AppUserModelId (AUMID) used for desktop toast notifications. Once Windows detects the shortcut file (.lnk file), desktop toasts will display the project name in the toast instead of the AUMID.

Notes:
  • Since it might take Windows some time to detect the new shortcut file, you should defer any notification messages until a few minutes after PlatformInitialize is called for the first time.
  • PlatformInitialize only performs the shortcut behavior described above on Windows platforms.
  • If not called explicitly, PlatformInitialize is implicitly called when the first notification is processed.
  • You can call PlatformInitialize for Windows programs to avoid the bug of the first wrong notification title "Embarcadero.DesktopToasts.xxx"