iOS 10 Local Notifications dismissing early when screen is unlocked - ios

I recently switched over to using PushKit and implementing local notifications so that I could do stuff like make the phone ring while another user is "calling" and have the notification dismiss as soon as the caller hangs up.
I am doing this by using pushkit and when the caller calls, a pushkit push is sent and a local notification that has a sound (repeating) for 28 seconds plays so that the notification stays up the whole time while the sound plays (at least in older iOS versions). And when the caller hangs up, another pushkit push is sent, and the previous local notification is canceled and another "missed call" one pops up. If the caller doesn't hang up, the call times out after 20 seconds and the "missed call" notification is sent then.
So my problem is that in iOS 10, if the screen is unlocked, the "ringing" notification goes away after about 6-7 seconds regardless of what the caller does. Then when the caller hangs up, the "call missed" notification displays.
On iOS 9 and iOS 8, the notification stays on the users screen until the user hangs up or the call times out.
Is there something special you have to do in iOS 10 to make the local notification stay on screen longer than 6-7 seconds if the screen is unlocked?

Related

IOS local notification custom 30 seconds sound got cut off when on screen banner went up(app in foreground) I am using voip push notification

Does anyone know is it possible to keep playing the custom notification sound after notification banner went up (app in foreground, in background it works perfectly full 30 seconds).

Why will my notification sound alert not go off when go to the lock screen on my device and re-enter the app?

I put in a notification into my app that works just right when I want it to go off. However I put a custom sound to that notification thats is about 30 seconds long. When I am at the HOME SCREEN of my device, when the the notification + sound goes off, I re-enter the app and the sound goes away. But when I am at the LOCK SCREEN, the notification goes off but when I re-enter the app it does not turn off. WHY
I guess, you can check the notification agent, whether the program allows notifications in the background.

Sometimes Notifications cause iOS screen to just wake up

That's really weird problem..my notifications is working perfectly but in very random and rare cases, the screen just is woken up but no notification appears.
Although I'm using native Swift, it seems it's a common problem
IOS Push notification - Sometimes only wakes screen and plays sound
Do you have any suggestions?
If you have a line of code that reduces the application badge number when a notification is received, make sure that this line doesn't get called when app state is not "Active".

PUSH issue in iOS10 and swift 3

when my app is in foreground and receive push notification it displays notification on screen. After sometime (2-3 seconds) if user not tap the notification it goes, So my question is how can i handle push notification if user not tap on the notification. When the app is in foreground ios 10.0*
Just for example If user login at another device i will receive
notification on previously logged in device, if app is in foreground
the use will see the notification that login at another device, if
user tap on notification it moves to the login screen, but what if
user don't tap on notification
You could add a ViewController in your app that saved the push notification's data. And when the user navigates there, they can view them.
The duration of push notification is a system defaulted property. The default behavior is for that to show up for 2-3 seconds, and dismissed automatically if it's not tapped. You cannot change the duration of a push notification itself.
Previously, there is a trick that you can have a longer customized sound for your notification which can hold it on screen for up to 30 seconds, but that's from 5 years ago. I doubt that this can still be used today in iOS 10.0

change remote notification time on screen

I have in my app a video chat.
And for the incoming call i'm using remote push notifications.
Is there a way to leave the notification on screen for a longer time then the default?
I need it to be on screen for about 20 seconds.
Thanks

Resources