Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Getting push notification from Windows in Qt desktop application.

Getting push notification from Windows in Qt desktop application.

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 2.2k Views
  • 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 Offline
    H Offline
    Hetal
    wrote on last edited by
    #1

    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
    0
    • A Offline
      A Offline
      ambershark
      wrote on last edited by
      #2

      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
      2
      • H Offline
        H Offline
        Hetal
        wrote on last edited by
        #3

        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
        0
        • H Hetal

          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 Offline
          A Offline
          ambershark
          wrote on last edited by
          #4

          @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
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved