Getting push notification from Windows in Qt desktop application.
How can I get push notification from Windows Notification Server in Qt desktop application?
What should be the approach?
It should all be via http requests from what I've read of WNS. Check out this page for example code http:
So basically you can go socket direct with QNetwork* classes or you can go with http helpers with the QHttp* classes. It's basically up to you how you want to handle it.
Document says for requesting channel URI there should be call to createPushNotificationChannelForApplicationAsync API (https://msdn.microsoft.com/library/windows/apps/hh465412) which needs support for Windows Runtime.
We are currently using Qt 5.9.1 Desktop binaries, but for having, Windows Runtime support, do we need to upgrade our Qt to Qt WinRT?
I tried to call this API with Qt 5.9.1 Desktop binaries, but that is not working. As soon as I enable WinRt support in my Qt Desktop application it gives me following warning at runtime.
The application was unable to start correctly (0xc000a200). Click OK to close the application.
Which indicates a COM error “This operation is only valid in the context of an app container.”
Let me know if some more information is required.
@Hetal I've never used WinRT, with or without Qt. So I can't answer this. You can try creating a new topic specifically about using WinRT and Qt and someone who is more into Windows could help. :)