I have a server that sends me push notifications and let's say that I have 5 notifications on my phone. If I open one of them all other notifications disappears. I want only the one clicked to disappear.
This is how I handle receiving notifications:
func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject], fetchCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void) {
if ( application.applicationState == UIApplicationState.Inactive || application.applicationState == UIApplicationState.Background )
{
// navigating user to a view controller
}
application.applicationIconBadgeNumber = 0
}
Do Not Disturb or Airplane Mode is on. Either system or app notifications are disabled. Power or data settings are preventing apps from retrieving notification alerts. Outdated apps or OS software can cause apps to freeze or crash and not deliver notifications.
You can prevent this from happening by setting the notifications as persistent from your settings if that's what you're after. Open the setting app on your iPhone. Select notifications and select the app. Enable persistent notifications.
Check the Notification Settings It is possible to have notifications disappearing from the lock screen if the notification settings are incorrect. To ensure you can see everything you want, the first thing you need to do when you have this issue is head to Settings>>Notifications.
It's normal for the notification badges to clear on the app's taskbar icon when the app is opened.
Your notifications will now stay longer on the bottom right of your screen before they disappear. Open the Control Panel in Large icons view, and click on Ease of Access Center . Under the “Explorer all settings” section, click on the “ Use the computer without a display ” link.
Here are some of the ways to fix it when notifications are not showing up on your Android device. Check That Do Not Disturb is not enabled. It may seem obvious, but forgetting Do Not Disturb is enabled is one of the most common causes for not receiving notifications. If this setting is on (enabled), turn it off, and they will start working again.
By default, the notifications will pop up for 5 minutes before they are sent off to the Action Center. If you would like the notifications to stay a litter longer, here are 3 ways to change Windows 10 notification duration with ease.
By setting the applicationIconBadgeNumber
to 0
, you also remove every notification from the notification center.
This has also been discussed here: iOS application: how to clear notifications?
Furthermore, it is not possible to programmatically remove a single notification, but from iOS8 on, the OS will handle this for you when a user taps a single notification. This has also been discussed here: Remove single remote notification from Notification Center
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With