#!?@
PUSH NOTIFICATIONSWojciech Łowiec
Sparkbit
BASIC CONCEPTABOUT GCM & APNS
PUSH NOTIFICATION IS A PIECE OF INFORMATION APPEARING ON MOBILE DEVICE SCREEN
IT NOTIFIES YOU ABOUT MESSAGES OR EVENTS WITHOUT THE NEED TO ACTUALLY OPEN A SOFTWARE
Google Cloud
Messaging
Apple Push Notific�ations
Mi�rosoft Push
Notific�ation Servi�e
IMPLEMENTATIONS
DOESN’T IT LOOK FAMILIAR?
reminds user about the app
battery lasts longer than in „pull model”
no delivery guarantees
ready-to-use and free
PROS & CONS
BUCKLE UP!WE’RE TAKING YOU TO THE PROCESS
App Backend Server
Push Notification Server
Push Notification Service
Mobile App
Notification
Notification
Notification*
Register/receive device id
Send Device/User ID
* Push Notivication Server sends notifications asynchronously, not right after getting the notification.
Mobile Device
• Device/user is identified by the address (digital code) and the exact same address must be given to the backend• Messages are sent asynchronously – we get delivery
confirmation from server not from the device • Addresses are unique within an application• One notification goes to many addresses (optional)• Mobile app can get notification from various backends• Payload in json format (optional)
GCM & APNSWHAT DO THEY HAVE IN COMMON?
GCM vs APNS
Communicates with 2 different
servers via TCP/IP (TLS)
Authorized by p12 file
(private key + X.509
certificate)Requires
registering the mobile
app
Multicast to many
devices
Collapsible message
Server tells you the
expiration date of
“device id”
Possible to define TTL
(0s – 4 weeks)
Payload size up to
4Kb
Delay_while_idle message waits until
device is activeGCM
Payload size 256b
(iOS8*2Kb)
Communicates with
single server via HTTP protocol (optional XMPP)
Authorized by an access
token
Doesn’t require
registering the mobile
app
Only the last
notification is delivered
Need to contact
Feedback Service in
case of expired
“device id”
Application will show only a
simple system pop up while in the background (it can do more
while in foreground)
One can set up TTL but only setting
0s is guaranteed to
work
APNS
THANK YOU FOR YOUR TIME
TAKE CARE