13
#!?@ PUSH NOTIFICATIONS Wojciech Łowiec Sparkbit

Your Guide to Push Notifications - Comparing GCM & APNS

Embed Size (px)

Citation preview

Page 1: Your Guide to Push Notifications - Comparing GCM & APNS

#!?@

PUSH NOTIFICATIONSWojciech Łowiec

Sparkbit

Page 2: Your Guide to Push Notifications - Comparing GCM & APNS

BASIC CONCEPTABOUT GCM & APNS

Page 3: Your Guide to Push Notifications - Comparing 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

Page 4: Your Guide to Push Notifications - Comparing GCM & APNS

Google Cloud

Messaging

Apple Push Notific�ations

Mi�rosoft Push

Notific�ation Servi�e

IMPLEMENTATIONS

Page 5: Your Guide to Push Notifications - Comparing GCM & APNS

DOESN’T IT LOOK FAMILIAR?

Page 6: Your Guide to Push Notifications - Comparing GCM & APNS

reminds user about the app

battery lasts longer than in „pull model”

no delivery guarantees

ready-to-use and free

PROS & CONS

Page 7: Your Guide to Push Notifications - Comparing GCM & APNS

BUCKLE UP!WE’RE TAKING YOU TO THE PROCESS

Page 8: Your Guide to Push Notifications - Comparing GCM & APNS

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

Page 9: Your Guide to Push Notifications - Comparing GCM & APNS

• 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?

Page 10: Your Guide to Push Notifications - Comparing GCM & APNS

GCM vs APNS

Page 11: Your Guide to Push Notifications - Comparing GCM & 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

Page 12: Your Guide to Push Notifications - Comparing GCM & APNS

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

Page 13: Your Guide to Push Notifications - Comparing GCM & APNS

THANK YOU FOR YOUR TIME

TAKE CARE