4

We have an iOS application (softphone) that receives remote APNS push notifications. Our server knows to send APNS push when there is incoming call to this user, and our softphone app is not the active application on the device. APNS arrives, presents incoming call to user, banner or alert popup shows, ringtone starts playing. If user taps notification, notification goes away, ringtone stops, our app starts and answers the call. So far so good. However, if incoming call notification presented as a banner, user may start our application directly, by tapping application icon. In the case, we want our app to immediately hide/dismiss incoming call notification. We tried sending these commands (as per iOS application: how to clear notifications?):

[[UIApplication sharedApplication] setApplicationIconBadgeNumber: 0];
[[UIApplication sharedApplication] cancelAllLocalNotifications];

The problem is the notification banner disappears but notification sound (25 second wav ringtone) continues to play to the end. Is there any way to stop this notification tone immediately, from the our code?

Community
  • 1
  • 1
  • 1
    A push notification and a local notification are presented in a similar way, but are 2 totally separate things. So `cancelAllLocalNotifications` will do nothing at all when it comes to push notifications. – Alex Wayne Oct 24 '12 at 19:34

0 Answers0