Jump to content
Shavkat PANDA

Embarcadero Toaster - Notification Window Caption in Win10

Recommended Posts

When called for the first time (since OS started) the Notification Caption looks like this (see pic). All other times it's just like expected (program name).

 

How to fix that?

notif.jpg

Share this post


Link to post

Which Delphi version are you using? When I check in 10.0 Seattle, the following code from System.Win.Notification makes it pretty obvious:

 

constructor TNotificationCenterWinRT.Create;
var
  LWSAppID: TWindowsString;
begin
  inherited;
  FNotifications := TDictionary<string, IToastNotification>.Create;
  LWSAppID := TWindowsString.Create(AppId + THashBobJenkins.GetHashString(ParamStr(0)));
  FToastNotifier := TToastNotificationManager.Statics.CreateToastNotifier(LWSAppID);
end;
  private const
    AppId = 'Embarcadero.DesktopToasts.';

I would not expect it is still like this in current Delphi versions.

Share this post


Link to post

I don't have a full solution for you. The "Embarcadero.DesktopToasts." plus some hash value at the end is hardcoded into System.Win.Notification.pas

 

You need to take a look at the constructor above and probably

class function TNotificationCenterWinRT.CreateShortcut(): Boolean;

 

I would assume (not tested) that you can either

  1. Create your own subclass of TNotificationCenterWinRT that does not have this weird behaviour
  2. Modify System.Win.Notification.pas

 

Also, you might want to post this at quality.embarcadero.com

 

Altough the last time it was brought up (2016), it was closed as "Cannot reproduce"

https://quality.embarcadero.com/browse/RSP-14776

Edited by Der schöne Günther
  • Like 1

Share this post


Link to post
On 12/21/2020 at 5:59 PM, emailx45 said:

try TenForums about MSWindows system.

Notification Settings: What is "Embarcadero.Desktop.Toasts.CF4ADDBE" ?

https://www.tenforums.com/general-support/80933-notification-settings-what-embarcadero-desktop-toasts-cf4addbe.html

 

NOTE: See at Computador\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings some reference about the "app"-ghos

By the way It was really funny to see people trying to know what it is.

 

Share this post


Link to post
On 12/21/2020 at 6:10 PM, Der schöne Günther said:

Which Delphi version are you using? When I check in 10.0 Seattle, the following code from System.Win.Notification makes it pretty obvious:

 


constructor TNotificationCenterWinRT.Create;
var
  LWSAppID: TWindowsString;
begin
  inherited;
  FNotifications := TDictionary<string, IToastNotification>.Create;
  LWSAppID := TWindowsString.Create(AppId + THashBobJenkins.GetHashString(ParamStr(0)));
  FToastNotifier := TToastNotificationManager.Statics.CreateToastNotifier(LWSAppID);
end;

  private const
    AppId = 'Embarcadero.DesktopToasts.';

I would not expect it is still like this in current Delphi versions.

It is still there just in a new refactored structure but the same logic.

Share this post


Link to post
Guest

RAD Studio 10.4.1 + FMX project + TNotificationCenter

  • message is showed in first click and none error for here!

image.thumb.png.a8ea2fa3da9e7a78bff71a61b95ed32c.png

hug

Share this post


Link to post
Guest

in time, I had serious problem with MSWindows 10 Enterprise build 20H2 ...19042.804 and my Kaspersky IS 2021!!! :classic_ohmy:

 

all was very well... then, one day "boooommmm"

crash all system whole.

later, when I try open any software not MS ... in ~3 seconds later load it and the app was cloded no error, no message, nothing.

solution: reformat disk and goback to buil 2004 with same softwares as before.

 

this remember me about Oct/2018 the infame release MSWindows  :classic_unsure:

 

for while,  no update for this new 20H2 build.

Until, ... before 746 was ok... but later... dont

Edited by Guest

Share this post


Link to post

Hi

 

For those how haven't seen it, the solution is to call PlatformInitialize on your TNotificationCenter component some times before sending any notification like in FormCreate event.

 

Windows will have time to see the shortcut file linked to the registry key and the notification and so not display the registry key name but the EXE file name instead.

 

This problem is just a simple delay in Windows between creating files and seeing them in other API... 

 

If you have previous Delphi releases, without PlatformInitialize method, you can create a shortcut to your program in the user startup menu program folder. It should work.

  • Like 2
  • Thanks 2

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×