-
Notifications
You must be signed in to change notification settings - Fork 8
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
Notifications do not appear in Windows 10 Entreprise #2
Comments
I guess the |
Thank you for your quick answer. Yes maybe the Windows Runtime API is different but i think it's more a dependency issue. For example this package https://github.com/hallazzang/go-windows-programming/tree/master/example/gui/notifyicon is working fine with both windows environments which means that the APIs are the same i think. The advantage of your package for me is that it's working correctly even if i run my application as a windows service (normally it should not because windows services can not interact with windows desktop) which is not the case for all other packages i tested even in other programming languages. I will continue my investigation. Thank you again. |
This is a different implementation. Can you try fyne-io/fyne? If it can work, I think I can try to fix it. // https://github.com/fyne-io/fyne/blob/7229e889d49c81a83b0b7e09400837f67f6ddad5/test/notification_test.go#L12-L20
func TestAssertNotificationSent(t *testing.T) {
n := fyne.NewNotification("Test Title", "Some content")
myApp := fyne.CurrentApp()
test.AssertNotificationSent(t, n, func() {
fyne.CurrentApp().SendNotification(n)
})
assert.Equal(t, myApp, fyne.CurrentApp())
} |
I tried fyne-io/fyne and it is working fine in both windows environments. |
Can you help me test it on
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
[Windows.UI.Notifications.ToastNotification, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null
$APP_ID = 'test_AppID'
$template = @"
<toast activationType="protocol" duration="short">
<visual>
<binding template="ToastGeneric">
<text>test_title</text>
<text>test_message</text>
</binding>
</visual>
<audio silent="true" />
</toast>
"@
$xml = New-Object Windows.Data.Xml.Dom.XmlDocument
$xml.LoadXml($template)
$go_toast = New-Object Windows.UI.Notifications.ToastNotification $xml
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier($APP_ID).Show($go_toast)
PowerShell -ExecutionPolicy Bypass "(Get-Content -Encoding UTF8 -Path D:\issues2\toast.ps1 -Raw) | Invoke-Expression;" |
I tested this script in Windows Entreprise environment and it's not working. |
Please delete this line and try again [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
[Windows.UI.Notifications.ToastNotification, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null
$APP_ID = 'test_AppID'
$template = @"
<toast activationType="protocol" duration="short">
<visual>
<binding template="ToastGeneric">
<text>test_title</text>
<text>test_message</text>
</binding>
</visual>
-- <audio silent="true" />
</toast>
"@
$xml = New-Object Windows.Data.Xml.Dom.XmlDocument
$xml.LoadXml($template)
$go_toast = New-Object Windows.UI.Notifications.ToastNotification $xml
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier($APP_ID).Show($go_toast) |
I retested without this line and it still not working. |
I've followed github.com/Windos/BurntToast, but I can't understand how it works Please delete these lines and try again [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
-- [Windows.UI.Notifications.ToastNotification, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
-- [Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null
$APP_ID = 'test_AppID'
$template = @"
<toast activationType="protocol" duration="short">
<visual>
<binding template="ToastGeneric">
<text>test_title</text>
<text>test_message</text>
</binding>
</visual>
-- <audio silent="true" />
</toast>
"@
$xml = New-Object Windows.Data.Xml.Dom.XmlDocument
$xml.LoadXml($template)
$go_toast = New-Object Windows.UI.Notifications.ToastNotification $xml
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier($APP_ID).Show($go_toast) |
Sorry, I'm still trying to figure out the differences with fyne-io/fyne Please try again, if it still doesn't work, I'm sorry I may not understand how it works correctly [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
[Windows.UI.Notifications.ToastNotification, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null
$APP_ID = 'test_AppID'
$template = @"
<toast activationType="protocol" duration="short">
<visual>
<binding template="ToastGeneric">
<text>test_title</text>
<text>test_message</text>
</binding>
</visual>
<audio silent="true" />
</toast>
"@
$xml = New-Object Windows.Data.Xml.Dom.XmlDocument
$xml.LoadXml($template)
$go_toast = New-Object Windows.UI.Notifications.ToastNotification $xml
--[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier($APP_ID).Show($go_toast)
++[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("$APP_ID").Show($go_toast); |
It still not working. Thank you for your investigation. i think i will use github.com/Windos/BurntToast for my application. Thank you again |
Very sorry, I will keep an eye on github.com/Windos/BurntToast and try to fix it |
Hello,
I'm trying to use your package in my custom application to display notifications. It is working fine on Windows 10 Professionnel but nothing appears when i run my application on Windows 10 Entreprise (The app runs without errors but does not display the notification)
Do you have any idea why it is not working on Windows 10 Entreprise ? Or if there is any dependencies that should be installed on windows to make it work.
Thank you
The text was updated successfully, but these errors were encountered: