push notifications
DESCRIPTION
A little presentation about push notifications on BlackBerry 10TRANSCRIPT
Push notificationsBlackBerry 10
Overview
• What are push notifications?
• Push Essentials Vs. Push Plus
• Architecture
• Message structure
• Practical approach
• NodeJS module
What are push notifications?
• Messages
• Send from a server to a device
Push Essentials Vs. Push Plus
What’s up with that?
• Push Essentials• No status requests
• Push Plus• Status requests
Architecture
Physical entities
• Mobile device
• Applicationserver• Push Initiator
• Pushserver• Push Proxy Gateway
Identification
• PIN-number
• Application ID
• Password
• Content Provider ID• CPID
Procedure
• Registration phase
• Pushphase
Registration phase
Push phase
Message structure
PAP-standard--PMasdfglkjhqwertContent-Type: application/xml; charset=UTF-8
<?xml version="1.0"?><!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.1//EN" "http://www.openmobilealliance.org/tech/DTD/pap_2.1.dtd"><pap> <push-message push-id="push.endare.com@1369139017071" source-reference="3021-50568ede737MM608a91m02ic289652m85r" deliver-before-timestamp="2013-05-21T14:27:48Z"> <address address-value="7F308D" /> <quality-of-service delivery-method="unconfirmed" /> </push-message></pap>--PMasdfglkjhqwertContent-Encoding: binaryContent-Type: text/htmlPush-Message-ID: push.endare.com@1369139017071
This is an example
--PMasdfglkjhqwert--
Practical approach
Registration @ BlackBerry
https://www.blackberry.com/profile/?eventId=8121
Registration @ BlackBerry
• Application ID
• Password
• Content Provider ID• CPID
Push Initiator
• Push Service SDK
• Written in…
Push Initiator
• Push Service SDK
• Written in…
NodeJS module
• Easy to use
• A few lines of code
NodeJS moduleMakes life a lot easier…
What is NodeJS
• Awesome
• Fast
• Powerfull network applications
• Perfect for real-time applications
• JavaScript
• Awesome
How to use?var pushInitiator = new PushInitiator(applicationId, password, cpid);
var message = new PushMessage(id, “Hello World!”);message.addRecipient(123456); // PIN number
pushInitiator.push(message, function(err, result) { // herpa derp});
npm
• Node Package Manager
npm install node-bb10
https://npmjs.org/package/node-bb10
Reminder: switch to momentics
Cascades
Thanks for your attention…