Forum Xamarin.Forms

Best way to show notification on Push Message?

MaruMaru DEMember ✭✭

Hi everyone,

is there a way to show a notification on a push message besides using an AlertDialog?
The best way would be obviously with a cross-platform solution, or do I must implement something like that on every device separately?


  • rmarinhormarinho PTMember, Insider, Beta Xamurai

    I think Yes, you will need to abstract the the way you register for notifications and how the are receive in each platform, you can use a interface and dependency service to do this.

    take a look here to get you started:

    Your interface can expose a event that 's NotificationReceived, and you subscribe to it and show the alert..

    I m going to write one for an app i m doing

  • MaruMaru DEMember ✭✭

    @rmarinho‌, thank you for your insight on that.

    I completed the registration and receiving of messages already on the different platforms, but I want to show the user a notification thats not an AlertDialog, because I think to interrupt the user while doing something with a popup like control is bad design in most cases.
    Something like the NotificationBar in Android or the Notification Center in iOS.

  • rmarinhormarinho PTMember, Insider, Beta Xamurai

    Hum i see.. i think for example in iOS you get that out of the box when you get a push notification no?

  • MaruMaru DEMember ✭✭

    @rmarinho‌ is that so on iOS? I don't have my app in iOS now but then I only need to implement something extra for Android.
    Not optimal but better then nothing.

Sign In or Register to comment.