Windows-Toasts icon indicating copy to clipboard operation
Windows-Toasts copied to clipboard

Actions not working (very specific case with MSIX, etc.)

Open Pololot64 opened this issue 2 years ago • 2 comments

Hello, this is a very specific question as most people do not deploy python programs onto the Microsoft Store.

Here is what I am trying to do. Most of the details can be ignored: Packaged .py to an exe with nuitka or pyinstaller. Actions work with a custom aumid I make.

However, when I then bundle my exe using MSIX, the program runs in a sandboxed environment and is required to have the aumid of the Windows App Package. I hardcoded this in and my actions show up on the toasts correctly but I am unable to receive any actions.

I think this has something to do with the solution but I am not sure: https://learn.microsoft.com/en-us/windows/apps/design/shell/tiles-and-notifications/send-local-toast?tabs=desktop-msix#step-3-handling-activation

Of course this is not an issue with this library at all. I am just looking for any suggestions or pieces of wisdom you may have :).

Pololot64 avatar Aug 08 '23 21:08 Pololot64

I believe the link is for activating the toast after its relegation to the action center (#12).

the program runs in a sandboxed environment and is required to have the aumid of the Windows App Package

You /should/ still be able to provide a different AUMID. Does the default cmd one also not work?

DatGuy1 avatar Aug 11 '23 17:08 DatGuy1

It does not unfortunately. I did a lot of research into it, and it seems that windows has the option of "re-routing" the notification actions using com. I found a way around it which is not ideal (by removing notification specific code from my MSIX app manifest for anyone who finds this later) but the real solution would be to implement this link https://learn.microsoft.com/en-us/windows/apps/design/shell/tiles-and-notifications/send-local-toast-desktop-cpp-wrl in c++ and then load that into Python. Unfortunately that is out of my area of expertise so I am currently sticking with my workaround.

Pololot64 avatar Aug 11 '23 20:08 Pololot64