Can anyone please give me any idea for show badge count in Xamarin iOS when application in background
Actually In background there are no any method trigger in Xamarin iOS when notification come.
Can anyone please give me any idea for show badge count in Xamarin iOS when application in background
Actually In background there are no any method trigger in Xamarin iOS when notification come.
public class UserNotificationCenterDelegate : UNUserNotificationCenterDelegate
{
#region Constructors
public UserNotificationCenterDelegate()
{
}
#endregion
#region Override Methods
public override void WillPresentNotification(UNUserNotificationCenter center, UNNotification notification, Action<UNNotificationPresentationOptions> completionHandler)
{
/// here we can add badge
}
}
*****************
public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions)
{
UNUserNotificationCenter.Current.Delegate = new UserNotificationCenterDelegate();
----------
------------
}