danflu
danflu

Reputation: 317

Custom push notification screen

I'm developing an iOS video chat application. I would like to display a notification like the FaceTime application does when someone calls me.

Currently I use push notifications that show banners, with a message and a custom sound.

Instead I want my app to show a custom screen for an incoming event like someone calling me for example. Is that possible using apple public API's ?

Please, see the FaceTime notification screen below.

Ps.: Skype also uses a different notification screen.

Thanks a lot, Daniel

facetime screen

Upvotes: 0

Views: 1064

Answers (3)

vikingosegundo
vikingosegundo

Reputation: 52227

I doubt it has anything to do with push notifications, in fact Skype you are mentioning was able to do it before push notifications were available.

Instead iOS gives you some extra features if you create an app with background mode "voip" (voice over ip). This will allow the app to wake up and brought to the foreground once traffic is detected on the network sockets, and applicationWillEnterForeground: is called. And from there you can use any view controller.

If you now think «hmm, my app doesn't offer voip, but I will pretend to do so to get superior notifications» — don't try it, apple will reject any app claims to be a voip app just to get endless background time.

Upvotes: 3

BenIntelliData
BenIntelliData

Reputation: 83

I'm not sure how they did it, but Skype managed to get a customized notification when a User receives a call both while the device is locked and while in use.

Device Locked Incoming Call

In Use Incoming Call

http://blogs.skype.com/2014/09/22/skype-5-5-for-iphone-answer-skype-calls-in-an-instant/

EDIT: Looks like IOS8 added an Interactive Notifications API. This is likely your next question: How do I make interactive notifications in iOS 8 app?

Upvotes: 2

gagarwal
gagarwal

Reputation: 4244

No, push notification dialog is a system dialog which cannot be customized. However FaceTime is Apple's application and they can customize it the way they want, not open to third party developers.

However you can take advantage of iOS 8.0 addition "UIMutableUserNotificationCategory" to customize the actions in the notification:

https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIMutableUserNotificationCategory_class/index.html

Example tutorial: http://www.thinkandbuild.it/interactive-notifications-with-notification-actions/

Upvotes: 3

Related Questions