Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to re-enable notifications for specific application name. #21

Open
ms7m opened this issue Nov 11, 2020 · 3 comments
Open

Unable to re-enable notifications for specific application name. #21

ms7m opened this issue Nov 11, 2020 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed Windows

Comments

@ms7m
Copy link
Owner

ms7m commented Nov 11, 2020

Reference

dynobo/normcap#87

Looks like if a user manually "turns off" the notification sent by notify-py. They are unable to "re-enable".
Need to find a workaround to allow the user to have the option to re-enable in the Windows Settings..

Current workaround is to simply change the application_name to something else each time you send a notification or when first initializing the Notify object..

@dynobo
Copy link
Contributor

dynobo commented Nov 28, 2020

I just looked into this problem. Seems like to show up in the windows settings "Notifications & Actions" in the "Get notfications from these apps" section, the application triggering the notfication needs an AppID, to be more precise a System.AppUserModel.ID.

This is AppID usually is added by software installer. But if you add a shortcut to the StartMenu, and AppID is generated, too! In this case, the path to the executable is the AppID. To test that, run Get-StartApps in powershell. This will output programs along with their AppID.

This AppID then has to be used in notify-py:

        notification = Notify()
        notification.application_name = "MyProgrammsAppID"

After the first notification is shown, the setting will show up in "Notifications & Actions". You can easily test that this works, by picking one AppID of the Get-StartApps, which App not yet has an entry in the notification settings, and trigger an notification with notify-py using that AppID.

Here's the blog post that helped me most to figure that out.

I see three options how to mitigate this issue for notify-py

  1. Try to integrate the automatic creation of an AppID as part of the library
  2. Offer an additional function for creating the AppID which accepts necessary arguments, like path to the executable, a name, and a path to icon
  3. Leave the implementation part out of notfiy-py and just provide docu for the libs users pointing them in the right direction.

What do you think? :-)

@ms7m
Copy link
Owner Author

ms7m commented Nov 29, 2020

Thank you so much for looking into this!

Reading that blog post really clears some stuff up.

I think option 3 is the best course; I can't find anything on automatically creating an AppID (and make it show up in Get-StartApps unless it's created in VS/Wix, exported to a .msi and manually ran by the user; and that seems to be a big-no-no to install apps like that.

On option 2 -- reading that blog and doing some testing, it seems that there is no restrictions on using any AppID that's listed. This allowed me to send notifications through typical system applications. It looks like it wouldn't need any extra arguments; just simply the AppID that was registered with the installed executable (if you want to go through the custom route).

Speaking of that method, it's a possible option to run notifications through "This Computer", and handle notification settings through "This Computer" in the settings. But I'm weary of this, as it may confuse the user on who is sending the notifications.
image

thanks for your help!

@Jemeni11
Copy link

Jemeni11 commented Oct 6, 2024

Here's the blog post that helped me most to figure that out.

Hi @dynobo, this might be a long shot but do you have some sort of local copy of this website? It's no longer up and I can't find it on the Internet Archive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed Windows
Projects
None yet
Development

No branches or pull requests

3 participants