I am using Onesignal for handlling push notification in android what is the best solution to handle messages when application is closed in xamarin.android
protected override void OnCreate(Bundle savedInstanceState)
{......
OneSignal.Current.StartInit("ONE_SIGNAL_CODE")
.HandleNotificationReceived(Static.HandleNotificationReceived)
.InFocusDisplaying(OSInFocusDisplayOption.Notification)
.EndInit();
}
public static void HandleNotificationReceived(OSNotification notification)
{
Android.Util.Log.Info(tag, "Handle Notification Received");
}
this method not called when application is closed work fine when application is on background or foreground