.Net MAUI – Local Notification

.Net MAUI – Local Notification

In this tutorial, we will see how to show the regional notification from the .Internet MAUI application. For this, we are making use of the “Plugin.LocalNotification” plugin which is appropriate with Xamarin.Types and .Internet MAUI. To know far more, pay a visit to right here.

Speedy Hyperlinks:

Undertaking Setup:

  • Launch Visible Studio 2022, and in the start window click Develop a new
    challenge to generate a new job.

  • In the Develop a new venture window, pick MAUI in the All venture varieties
    fall-down, find the .Web MAUI App template, and click the Up coming button:

  • In the configure your new undertaking window, title your venture, pick out a
    suitable locale for it, and simply click the Up coming button:

  • In the Additional data window, simply click the Produce button:

  • After the undertaking is created, we can able to see the Android, iOS, Windows
    and other working selections in the toolbar. Press the emulator or run button
    to make and run the app

Implementation:

  • Open Nuget Manager, research “Plugin.LocalNotification” and install the plugin.
  • To present the notification, open up your *.xaml.cs file and include namespace “Plugin.LocalNotification” by which includes “working with Plugin.LocalNotifications
  • In Answer Explorer, simply click MainPage.xaml and swap the webpage content with what is proven down below:

  • Open the MainPage.xaml.cs file and the site articles as proven beneath:

  • Below,

  • Title: Notification Title
  • Description: Notification Description
  • Subtitle: Notification Subtitle for collapsed check out
  • Plan: DateTime benefit to display the notification after the stated routine
  • Repeat: DateTime worth to repeat the notification after the pointed out frequency

Demo:

Comprehensive Code:

Obtain Code:

You can download the code from
GitHub. If you have
any doubts, experience free of charge to post a comment. If you preferred this post, and it is
beneficial to you, do like, share the post & star the repository on
GitHub.

Next Post

You're Spending Too Much Money on Your Website

Each company requires a internet site. Currently, it is come to be as significant – if not additional so – than getting a brick-and-mortar place of work or retailer. It is central to your marketing and advertising endeavours, the most effective way to arrive at new consumers, and the key […]
You’re Spending Too Much Money on Your Website

You May Like