xamarinxamarin.formsxamarin.androidxamarin-studio

How to implement Local Push notification in Xamarin Android


I am having the Xamarin.Forms application. I want to implement the local push notification for Android platform, through which an application can receive the notification whenever the app is minimized or phone is locked. I also want to wake-up the phone and display the notification on the lock screen whenever the phone is locked.

As I am new in this kindly help me.

Thanks in advance.

Vivek


Solution

  • What you need is push notifications not local notifications. Local notifications only work if your app is running. Push notifications are handled by OS (Android in this case). Xamarin is recommending using Firebase service to handle it. Procedure is pretty straight forward all what you have to do is follow Tutorial from official Xamarin site.

    Remote Notifications with Firebase Cloud Messaging