If you use Facebook Messenger on iOS and start a video chat with someone, the recipient will receive a push notification that stays on screen while the call is ringing. Then if the initiator who started the call hangs up before the recipient answers and the notification is on the screen, the notification is "canceled" and the sound stops, and then another notification pops up and says you have a missed call.
Does anyone know how this is implemented? How are they canceling a push notification that has already been pushed to the recipient?