What is the difference between VoIP notifications and notification sent with apns-priority 10?
Asked Answered
L

2

8

Here's what docs state:

The priority of the notification. Specify one of the following values:

10–Send the push message immediately. Notifications with this priority must trigger an alert, sound, or badge on the target device. It is an error to use this priority for a push notification that contains only the content-available key.

5—Send the push message at a time that takes into account power considerations for the device. Notifications with this priority might be grouped and delivered in bursts. They are throttled, and in some cases are not delivered.

And about VoIP:

Instead of persistent connections, developers should use the PushKit framework—APIs that allows an app to receive pushes (notifications when data is available) from a remote server. Whenever a push is received, the app is called to action. For example, a VoIP app could display an alert when a call is received, and provide an option to accept or reject the call. It could even begin taking precursory steps to initiate the call, in the event the user decides to accept.

Do I understand correctly that apns-priority defines message queuing at APNS side, and VoIP push type defines what happens on the device?

And what do they mean saying

It is an error to use this priority for a push notification that contains only the content-available key.

Will APNS return an error or is it just a bad practice?

P.S. I use AWS SNS for sending notifications and it does not support customisation of apns-priority, but I am curious how it affects the process.

Luciano answered 6/3, 2018 at 9:58 Comment(0)
R
3

The main difference is that even if your app is closed voip notification can wake your app for kill/suspended state and user notification just shows an alert without waking up your app for more refer. Apple documentation for pushkit

Rorrys answered 6/3, 2018 at 10:14 Comment(0)
D
2

The main difference is that VoIP notification will launch your app if it's not running or was killed from app switcher and you need to handle the notification in your code, while the normal notification will be shown immediately as local notification and will not start your app.

Determination answered 6/3, 2018 at 10:16 Comment(4)
so the app will lunch automatically when VoIP notification received. or we need to do something more?Progressive
It will be launched automatically.Determination
Hi can tell me how can i send push notification from a asterisk server. can i use AGI?Progressive
You can't. You must generate a VoIP certificate for a target app and use that on your push server.Determination

© 2022 - 2024 — McMap. All rights reserved.