Alexander Gorelik
Alexander Gorelik

Reputation: 4385

IOS push notification delete

I use a phone gap plugin and xcode 5.

Lets see the example of the problem:

The application is in background or closed.

  1. I send the notification.
  2. User sees the notification pop up, without clicking on it.
  3. I send another notification.

If user open notification bar it will see two notification actually i want to delete the previous some how and present to user only the second notification.

The eqvivalent in java is NotificationManage.cancelAll();

For now each/all notification i send are shown when user open notifications bar.

Any help appreciated.

Upvotes: 0

Views: 280

Answers (2)

Macrosoft-Dev
Macrosoft-Dev

Reputation: 2185

You can do this by [UIApplication sharedApplication].applicationIconBadgeNumber = 0; in the method didReceiveRemoteNotification. In this way notification center will be cleared.

Upvotes: 1

Wain
Wain

Reputation: 119031

You have (the app has) no control over that.

The user controls how many notifications they see in notification center. Notifications can be removed by the user and will be removed when acted upon (the app is opened from the notification).

Upvotes: 1

Related Questions