Closed ghost closed 8 years ago
I found an easy way to get around this was to add just a couple lines of code to the Android project.
in IPushNotificationListener.cs added stub... bool IgnoreNotification()
in PushNotificationImplementation.cs adjusted the code to this.... if (!parameters.ContainsKey(PushNotificationKey.Silent) || !System.Boolean.Parse(parameters[PushNotificationKey.Silent].ToString())) { if(!CrossPushNotification.PushNotificationListener.IgnoreNotification()) CreateNotification(title, message, notifyId, tag); }
this allows us to control it in the PCL. Anyway to get these couple lines added to the project?
Thanks for your suggestion. Try the newest NuGet package. Now should implement listener method ShouldShowNotification() to achieve this.
Thank you!
Is there a way to not create a notification if the user is currently in/using the app?
I know in iOS this seems to be the default behavior.