0

Is it possible to remove particular push notification message from an ios device or apns api using message Id

Currently I am sending the notification using

 data = json.dumps({"to" : gcm_token,
                            "content_available":False,
                            "priority": "high",
                            "notification": { "sound":"default",
                                              "badge":"1",
                                              "click-action":activityName,
                                              "body":subject}
                            })

 request_header={'Content-Type': 'application/json', 'Authorization': 'key=%s'%(Auth_Key)}

 request = urllib2.Request('https://gcm-http.googleapis.com/gcm/send', data, headers=request_header)
 response = urllib2.urlopen(request).read()
Community
  • 1
  • 1

1 Answers1

0

Badge, found in your code, is a number that indicates number of incoming messages displayed in the corner of client app home icon. You can remove the notifications by setting badge to 0 as discussed in Push Notifications Tutorial: Getting Started.

But if you want to remove a specific notification, solutions were already given in SO post - Delete a particular local notification. I hope it helps. :)

Community
  • 1
  • 1
Teyam
  • 7,686
  • 3
  • 15
  • 22
  • 1
    But if the cases like gmail where two notification sent to mobile and same user reads it from web I want to update and remove the particular notification how can i do that – Vignesh Srinivasan May 11 '16 at 12:26