Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Getting push notification from Windows in Qt desktop application.

    General and Desktop
    2
    4
    1819
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Hetal last edited by

      Hi there,

      How can I get push notification from Windows Notification Server in Qt desktop application?
      What should be the approach?

      Thanks,
      Hetal

      1 Reply Last reply Reply Quote 0
      • A
        ambershark last edited by

        It should all be via http requests from what I've read of WNS. Check out this page for example code http:
        https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/windows-push-notification-services--wns--overview

        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.

        My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

        1 Reply Last reply Reply Quote 2
        • H
          Hetal last edited by

          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.

          A 1 Reply Last reply Reply Quote 0
          • A
            ambershark @Hetal last edited by

            @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. :)

            My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

            1 Reply Last reply Reply Quote 1
            • First post
              Last post