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

Toast Notification Example Doesn't Work on Windows 10 #44

Closed
Eilie opened this issue Oct 30, 2017 · 2 comments
Closed

Toast Notification Example Doesn't Work on Windows 10 #44

Eilie opened this issue Oct 30, 2017 · 2 comments

Comments

@Eilie
Copy link

Eilie commented Oct 30, 2017

Hello,

After cloning the repo and executing

cargo run --example toast_notify --features "windows-data windows-ui"

Nothing really happens, no error, no toast, nothing. Program exits with code 0.
Not sure how to debug it. I could give more info but not sure what matters as well.
My rustc version is 1.23-nightly.
https://github.com/allenbenz/winrt-notification Doesn't work as well in same way.

@Boddlnagg
Copy link
Collaborator

I can reproduce this problem here ... the culprit seems to be the Fall Creators Update. See this stackoverflow answer.

Replacing the AppId "myrustapp.exe" with "{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\\WindowsPowerShell\\v1.0\\powershell.exe" in the example code in toast_notify.rs "fixes" this issue for me (in the sense that the notification appears again, but it is displayed as belonging to PowerShell).

I don't know if I should commit that kind of workaround, but anything else (like registering your own AppId) is probably out of scope for such a simple example.

By the way, Microsoft's API documentation has always stated that you need your own AppId for this to work, and it was actually a "bug" before Fall Creators Update that it worked with a bogus AppId such as "myrustapp.exe".

@Boddlnagg
Copy link
Collaborator

It works on master now. I just used PowerShell's App ID, which is not very pretty, but this is just an example anyway ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants