GSoC’19 :: Milestone 1

After a couple weeks of discussions, bug reporting, fixing and coding with lots of people from the KDE Community, KNotifications can now be used for applications targeted towards the Windows 10 OS. Yes! KNotifications could well be supporting Windows 10 native notifications within the next couple releases.

Any and all KDE applications using KNotifications need not change their code base to enjoy this new feature! More details follow:-

The SnoreToast Backend

The in-development branch brute4s99/snore-withactions in the KNotifications code base implements a new SnoreToast backend that kicks in when KNotifications is compiled for Windows 10 using the MSVC compiler. The changes done, in a simplified manner, are:-

  1. Adding a back-end- SnoreToast
  2. Creating a plugin for the new back-end – notifybysnore

> This new feature comes with a caveat though > the SnoreToast back-end needs to install a shortcut > to the application’s .exe file in the Windows Start Menu folder > with the Application ID of the application that wishes to use > KNotifications. This is, once again, handled by > the SnoreToast back-end itself! 😀

The apps just need to install the shortcut with the right parameters and they should be ready to rock!

P.S: We have an example for you to build upon; no need to reinvent the wheel! 😉

What the Application Developers Gotta Do

KDE Connect uses Craft as its dev – build system on Windows.

> Craft is an open source meta build system and package manager. It manages dependencies and builds libraries and applications from source, on Windows, Mac, Linux and FreeBSD.

The shortcut installation step is fairly easy, and a straightforward example has been demonstrated by KDE Connect at this diff. Most Important -> Line 35 and 39 . <br /> The diff demonstrates how the Craft blueprint of any application can be modified accordingly to use the SnoreToast back-end.

KNotifications picks up the application ID from here. Use whatever it contains for your own application, and replace org.kde.kdeconnect.daemon with that on Line 39 here.

A small demonstration for the SnoreToast backend with KNotifications:-

[youtube https://www.youtube.com/watch?v=lCeMWAG3CRo&w=740&h=416]