Is Windows.Networking.PushNotifications possible on Xaml hosted Win 32 applications?

Rohan Pande 445 Reputation points
2024-02-06T08:07:28.1733333+00:00

Hi,

I am creating a Xaml hosting on Win32 application. Can I use this Windows.Networking.PushNotification namespace? I am not sure because it belongs to UWP so asking it. Will this work?

Thanks

Developer technologies C++
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Minxin Yu 13,501 Reputation points Microsoft External Staff
    2024-02-06T08:18:56.03+00:00

    Hi, @Rohan Pande

    The sample is Win32 .
    https://github.com/microsoft/WindowsAppSDK-Samples/blob/main/Samples/Notifications/Push/cpp-console-packaged/cpp-console.cpp

    using namespace winrt::Microsoft::Windows::PushNotifications;

    And the document for C++ WinRT:
    https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.windows.pushnotifications?view=windows-app-sdk-1.4 For not supported APIs, please check : Windows Runtime APIs not supported in desktop apps

    Best regards,

    Minxin Yu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.