push notifications in Windows

Luis Rodriguez 0 Reputation points
2023-12-05T17:41:03.5466667+00:00

Hi, I'm developing an application in MAUI, and I'm working with push notifications in Windows, what is the normal behavior of push notifications when the application is closed (not minimized)? When the app is open the notifications arrive and everything is fine, but when it is closed, do they have to arrive and be shown or they only arrive when the application is running?

Azure Notification Hubs
Azure Notification Hubs
An Azure service that is used to send push notifications to all major platforms from the cloud or on-premises environments.
264 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,900 questions
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 15,256 Reputation points Microsoft Employee
    2024-01-26T04:05:14.8733333+00:00

    @Luis Rodriguez Hello! When your application is closed, push notifications should still arrive and be shown as toast notifications. However, keep in mind that the behavior may vary depending on the platform and the specific implementation of push notifications in your application. In the case of Windows, as you mentioned, you can use the ToastNotificationManager to create and show toast notifications. The code you provided seems to be registering a COM server to handle the activation of the toast notification when it is clicked. To ensure that your application can receive push notifications even when it is closed, you need to make sure that you have properly registered your application with the Notification Hubs service and that you are correctly handling the push notifications in your code. If you have any specific questions or issues with your implementation, feel free to provide more details and I'll do my best to help you out!

    0 comments No comments