Sending local push notifications
Alerts, reminders, and updates for ongoing in-app processes are great use cases for local push notifications. It’s important to understand the difference between local and remote notifications. Local notifications are scheduled or triggered from within your app and do not come from a server. While local notifications can appear even if your app isn’t running, they must be scheduled in advance to achieve this.
In .NET MAUI, creating a local push notification is straightforward with the Plugin.LocalNotification
library. By calling a few methods, you can send and manage notifications. In this recipe, we’ll build a basic app that sends a custom local push notification.
Figure 6.13 – Local push notifications demo
Important
The Plugin.LocalNotification
library supports only Android and iOS. You can’t show notifications using it in Windows or macOS.
Getting ready
To follow the steps...