7
votes

I am learning how to use Xamarin forms and I want to implement (push) notifications on Xamarin Forms. I have googled but to no avail. Does anyone know how to implement Local/Push notifications with Xamarin Forms? I am going to use an actual server at a later date but for now just showing a notification when I, for example, press a button, is totally OK for me.

Thanks for your help!

edit:

I am now using the DependencyService to access the Device OS's notification system instead of trying to use Xamarin Forms itself. Answers on this question are not necessary anymore!

3
Because in title you mentioned Local Notifications so please have a look at this simple sample from me: github.com/tkowalczyk/SimpleLocalNotificationsFormsTomasz Kowalczyk
Thank you very much! I'll be using your implementation!S. ten Brinke
Tomasz's github sample app worked like a charm. The only issue is that its only for Android. I will keep tinkering with it and try and add the IOS implementation. Thanks for sharing Tomasz!Tyrone Moodley

3 Answers

6
votes

Xamarin's documentation includes a guide to notifications:

https://developer.xamarin.com/guides/cross-platform/application_fundamentals/notifications/

It covers both local and remote notifications, including recommendations for libraries (e.g., PushSharp, UrbanAirship) to handle sending push notifications.

5
votes

You can use https://www.nuget.org/packages/Xam.Plugins.Notifier plugin for local notifications. This is one of the best plugin I've used with Xamarin Forms.

4
votes

You can also try local notification plug-in for Xamarin Forms https://www.nuget.org/packages/Plugin.LocalNotification/. It has more features and look at the source code if you are implementing your own version.