Reputation:
I am working on Emergency Type app . our requirement is show notification an play emergency sound for 3 minutes when we receive remote notification . i am able to do this when my app is running
or suspended
. but when app is not-running
the notification show only for few seconds.
Is there any way to show the notification for 2 minutes , when we receive remote notification. i have searched a lot but didn't find any way to do this , in ios app . This is payload for notification :
{"aps":{"alert":"Enter your message","badge":1,"sound":"pushAlert.mp3"}
Upvotes: 0
Views: 896
Reputation: 27438
No, this is not possible because this is default behavior and you can't change it! I mean you can not show notification with your custom time or you can not play long sound for the notification as it restricts to the 30 seconds
. check the Apple Doc says ,
Custom sounds must be under 30 seconds when played. If a custom sound is over that limit, the default system sound is played instead.
Upvotes: 2