Windows 10 Notifications - Action Center

I would like to know if it is possible to add items to the new message area (Windows 10 Notifications - Action Center) from within my app. Many applications post messages to this which results in a small popout on the lower right hand of the monitor.

Is this supported or possible in Xojo?

Thank you.

I cannot answer your question directly. However, I wish to offer a bit of food for thought.

If others dislike popups as much as I do, they probably set the “do not disturb” flag (do not disturb hours) so they don’t get the dreaded popups. If your messages are mission critical, I would probably not rely on the action center.

to disable popups, right click the action centre icon and set do not disturb period.

My 2 cents.

I get that but it is required for this application. Application notifications are built deeply into the OS now in Windows 10 and most applications utilize this standard method. In our case this in an internal business app that will require the users to have this on. It makes sense to use the built in notification process already implemented in the OS…

Action center is a feature of the New API. The underlying framework of UWA, aka “Metro” apps.

AFAIK this feature is not accessible to desktop apps today. With the Project Centennial converter later this year, it will be possible to access that API from a Desktop app, but since examples shown at the build conference use VS, I have no idea how we will be able to tap into that from Xojo.

For more about Centennial, see https://forum.xojo.com/31538-last-news-about-microsoft-project-centennial

However, it is fairly easy to emulate these notifications with a small window, a canvas for the icon and a multiline label, plus a couple timers to make it slide in and slide out. Of course they won’t appear in the action center, but it may suffice.

[quote=258278:@jean-paul devulder]if i understand, it is possible for win32 app

look this blog:

example on github

portage to xojo need huge work ;)[/quote]

Thank you for these links. Indeed, it is possible. But this means you have to create the interface between Win32 and the New API framework, which is based on .Net, and as you say, it is a huge amount of work for a small sliding dialog.

Unless you absolutely need your notification to be kept afterward in the Action Center, I believe emulating the dialog is far quicker, and can be made indistinguishable from the system one. BTW that is what I do :slight_smile:

[quote=258280:@Michel Bujardet]Thank you for these links. Indeed, it is possible. But this means you have to create the interface between Win32 and the New API framework, which is based on .Net, and as you say, it is a huge amount of work for a small sliding dialog.

Unless you absolutely need your notification to be kept afterward in the Action Center, I believe emulating the dialog is far quicker, and can be made indistinguishable from the system one. BTW that is what I do :)[/quote]

But i assume your approach then disrespects the users preference described by @Louis Desjardins and the user can become angry about your App posting Notifications while other Apps can’t post them, or?

Of course emulating the notification in a Win32 app will not be aware of the New API preferences. If the user hates notifications, it is possible to provide a setting in the app. Maybe one can tap into the registry as well. Some level of hacking may be required.

The issue here is perfectly illustrated by the rather arduous method Jean-Paul linked to. Implementing a tiny notification demands a HUGE amount of declares and stuff, plus installing a contract. Believe me, I also have created New API apps that are today in the Windows Store, doing that in Xojo will not be a walk in the park.

Of course, anything is doable, if one is willing to spend a week or so and has the necessary competence.

That said, my reply was to Joseph Evert who did not insist on disabling the notification, but rather, to display it.

Frankly, I think it will already be a feast if a Xojo app works and looks good under Windows 10. Meaning if it looks like a Modern UI app, with all the trimmings described in the Windows UWP Design Guidelines.

If one wants an app that conforms to all Windows 10 New API features, until Centennial is a reality, it is way easier not to mention faster to use VS.

Thank you all for your help, suggestions and helpful links.

I think for my app I will implement a status notification area at the bottom of main window to display messages. I thought it might be nice to implement this using the OS specific notification area but it is not worth the effort given the current state of things. In my case this is a specialized piece of software used internally so we can don’t necessarily have the constraints that something might have for a consumer based application. For example, the option to turn notifications off. In our case, if the application is running they will have no choice but to get the notifications.

Thanks again.