4

How whatsapp calling works, when the app is in background or even killed or even you are using other apps then also whatsapp call comes above your screen.

Can anyone please explain the mechanism behind it ?

boraseoksoon
  • 2,164
  • 1
  • 20
  • 25
Ankit
  • 217
  • 1
  • 11

2 Answers2

3

This uses Voip permission,Hence even if the app was killed still able to receive the notifications

radkrish
  • 130
  • 1
  • 15
  • 1
    Can you please share some links that how to achieve the same. – Ankit Oct 17 '16 at 11:10
  • [Tutorial](https://zeropush.com/guide/guide-to-pushkit-and-voip) and [Apple Docs](https://developer.apple.com/library/content/documentation/Performance/Conceptual/EnergyGuide-iOS/OptimizeVoIP.html) – radkrish Oct 17 '16 at 11:17
2

In background or even killed state, they use Pushkit ( Silent push notification ).

Silent push notification doesn't come in device's notification center. but you can receive various information like username, image, VOIP channel etc.

Then you need to schedule local notification as per payload receiving in silent push notification.

Your app will be invoke in background upto your local notification sound file plays. ( Max 30 seconds ). if you want to repeat after 30 seconds then get another silent push notification or schedule local notification again.

While tapping on local notification or local notification button, you can redirect user to particular screen.

Let me know if you any further help in setting up for Pushkit or VOIP.

Hasya
  • 9,792
  • 4
  • 31
  • 46
  • Please see the calling of whatsapp.. its call doesnt come on notification center only.. but it will come to your mobile phone... above all applications – Ankit Oct 17 '16 at 12:25
  • That is local notification only when getting calls while in other app. when you are in application then you can use different alert view controller or directly redirect to calling screen. – Hasya Oct 17 '16 at 12:36
  • Do have any idea on how to show local incoming call notification when device is locked. – Mansur Mar 06 '20 at 09:15