Search code examples
c#xamarin.formsxamarin.androidsignalrandroid-push-notification

Create Push notifications for Xamarin.Android without using FCM


I'm creating a xamarin.forms application and have got most of the app completed. My only hickup is push notifications. I'm sending my notifications to the app using SignalR and a .Net Web API Server. I'm able to receive notifications while the app is running however, I can't see tutorials for push notifications while the app is asleep. I've checked out services as well. Thank you for you help in advance.


Solution

  • SignalR is not a push notification and there is a difference between them.

    The main difference is that in case of SignalR you have to keep an opened connection to your hub in order to receive events / signals. So if you want to receive notifications while the app is killed or in background SignalR is a wrong solution since it is technically impossible to keep your application always running on a mobile device. However, push notification can awake your application when it is killed or in background.

    I would suggest to rethink your current solution instead of looking for hacks.