introduction to push technology © 2009 research in motion limited
TRANSCRIPT
![Page 1: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/1.jpg)
Introduction to push technology
© 2009 Research In Motion Limited
![Page 2: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/2.jpg)
© 2009 Research In Motion Limited
Agenda
This course covers the following topics:
– Introduction to developing applications for mobile devices
– Methods of application development for mobile devices
– Introduction to GPS and Wi-Fi® technology on BlackBerry® smartphones
![Page 3: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/3.jpg)
© 2009 Research In Motion Limited
Agenda
– Introduction to push technology
– Data structures and memory management on mobile devices
– User interface design for mobile devices
– BlackBerry themes and animated graphics
– Security considerations for developing applications for mobile devices
![Page 4: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/4.jpg)
© 2009 Research In Motion Limited
Introduction to push technology
Objectives:
– Define push technology and describe the benefits of push technology.
– Describe how a server-side push application works.
– Provide an example of how a server-side push works on a BlackBerry smartphone.
![Page 5: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/5.jpg)
Push technology
© 2009 Research In Motion Limited
![Page 6: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/6.jpg)
© 2009 Research In Motion Limited
Push technology
– Push applications send web content or other data to specific BlackBerry smartphones.
– The push application automatically delivers the information as soon as it becomes available.
![Page 7: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/7.jpg)
© 2009 Research In Motion Limited
Push technology
Benefits:
– Immediacy
– Efficiency
– Reduced latency
– Longer battery life
– Shorter learning curve
![Page 8: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/8.jpg)
Push applications for the BlackBerry Enterprise Server
© 2009 Research In Motion Limited
![Page 9: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/9.jpg)
© 2009 Research In Motion Limited
Push applications for the BlackBerry Enterprise Server
Two applications are required:
– Server-side push application
• Submits the push request
– Client-side listener application
• Listens for incoming push messages
![Page 10: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/10.jpg)
© 2009 Research In Motion Limited
Push applications for the BlackBerry Enterprise Server
Client/server push applications:
– Consist of a custom client BlackBerry smartphone application and a server-side application that pushes content to the client BlackBerry smartphone
– Provide more control and flexibility
![Page 11: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/11.jpg)
Push applications for the BlackBerry Enterprise Server
Advantages
– Store data on the BlackBerry smartphone
– Make network connections based on the information that comes in
– Integrate the data with BlackBerry applications such as a calendar
![Page 12: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/12.jpg)
© 2009 Research In Motion Limited
Push applications for the BlackBerry Enterprise Server
Server-side push applications:
– Make requests to the BlackBerry MDS Connection Service to push data to specified BlackBerry smartphone users
– Generate and send HTTP POST requests to the BlackBerry MDS Connection Service and use either the PAP push format or RIM push format to specify the delivery parameters
– Push data to individual users based on either their email addresses or their BlackBerry smartphone PINs, or to groups of users created and maintained on the BlackBerry® Enterprise Server HTTP Hypertext Transfer Protocol
PAP Push Access Protocol
PIN personal identification number
RIM Research in Motion
![Page 13: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/13.jpg)
© 2009 Research In Motion Limited
Push applications for the BlackBerry Enterprise Server
Supported push formats send an HTTP POST request to the BlackBerry MDS Connection Service.
– PAP push format
• The request contains a MIME multipart message that includes two components: an XML-based PAP control entity that defines the delivery parameters, and the data to be pushed.
MIME Multipurpose Internet Mail Extensions
XML Extensible Markup Language
![Page 14: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/14.jpg)
© 2009 Research In Motion Limited
Push applications for the BlackBerry Enterprise Server
RIM push format
– The pushed content is sent as a byte stream.
– The destination port is specified within the URL of the pushed content.
– The destination users and other delivery parameters are specified in HTTP headers included with the request.
URL Uniform Resource Locator
![Page 15: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/15.jpg)
© 2009 Research In Motion Limited
Push applications for the BlackBerry Enterprise Server
Client-side listener applications:
– Custom listener application
• Must create both the custom client-side application that receives the pushed data and the server-side application that makes the push request
– Configure the push listener to start up automatically
• Application automatically starts when you perform a hard reset on the BlackBerry smartphone or when the application is first installed
• Applications can have multiple entry points
![Page 16: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/16.jpg)
© 2009 Research In Motion Limited
Push applications for the BlackBerry Enterprise Server
Create an autostart application with multiple entry points using the BlackBerry® JDE Plug-in for Eclipse® or the BlackBerry® Java® Development Environment:
1. Create a background listener application, which starts a listener thread.
2. In the application properties, select the System module.
3. Select the Auto-run on startup option.
4. Code the main method to start the listener thread.
![Page 17: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/17.jpg)
Push applications for the BlackBerry Enterprise Server
5. Create a project that has just an application icon, and then choose the Alternate CLDC Application Entry Point project type.
6. Set the Alternate entry point to the main application.
7. In the Argument Passed to field, enter descriptive text.
8. Modify the source code and combine the two startup sections.
![Page 18: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/18.jpg)
© 2009 Research In Motion Limited
Push applications for the BlackBerry Enterprise Server
The BlackBerry® Browser:
– Contains a built-in listening thread on the BlackBerry smartphone
– Listens on port 7874
– Pushes web content or other browser-supported data
– Stores pushed content in a dedicated cache
![Page 19: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/19.jpg)
Web signals and BlackBerry Push API
© 2009 Research In Motion Limited
![Page 20: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/20.jpg)
© 2009 Research In Motion Limited
Web signals and BlackBerry Push API
Web signals and the BlackBerry Push API:
– Two push options for non-Enterprise or BIS-connected BlackBerry smartphone users
– Can push data to any network connected BlackBerry smartphone, even if the BlackBerry smartphone is not managed by an organization’s BlackBerry Enterprise Server.
API application programming interface
![Page 21: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/21.jpg)
© 2009 Research In Motion Limited
Web signals and BlackBerry Push API
Web signals:
– Near real-time content updates push data directly to the BlackBerry smartphone.
– Third-party content providers can add timely and relevant updates to their application portfolios.
![Page 22: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/22.jpg)
© 2009 Research In Motion Limited
Web signals and BlackBerry Push API
BlackBerry Push API:
– Lets you build push capability into Java® based consumer applications
– The pushed data is directed to the BlackBerry smartphone PIN number rather than the phone number
![Page 23: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/23.jpg)
Push application design considerations
© 2009 Research In Motion Limited
![Page 24: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/24.jpg)
© 2009 Research In Motion Limited
Push application design considerations
When developing push applications, consider:
– The type of information that users in your organization need pushed to them and how often you must push that information
– Having users subscribe to the push information that they require
![Page 25: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/25.jpg)
Components of a push request
© 2009 Research In Motion Limited
![Page 26: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/26.jpg)
© 2009 Research In Motion Limited
Components of a push request
PAP push and RIM push formats support the following:
– Reliable push requests
– Deliver before time stamp
– Deliver after time stamp
The PAP push service implementation also supports:
– Push cancellation
– Push status query
![Page 27: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/27.jpg)
© 2009 Research In Motion Limited
Components of a push request
Push request reliability:
– Specify that you want the BlackBerry smartphone to return a result notification when the pushed data is successfully delivered.
– If you do not specify a reliability level for your push method, the BlackBerry MDS Connection Service does not provide the push originator with any notification regarding the outcome of the push request.
– You must also specify a notification URL to which the BlackBerry MDS Connection Service sends result notifications.
![Page 28: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/28.jpg)
© 2009 Research In Motion Limited
Components of a push request
To specify a reliable push request:
– Using the PAP push format
• Include the <quality-of-service> element in the <pushmessage> element of the control entity
– Using the RIM push format
• Include the X-Rim-Push-Reliability header in the request.
![Page 29: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/29.jpg)
© 2009 Research In Motion Limited
Components of a push request
There are three levels of reliability:
– Transport
– Application
– Application-preferred
![Page 30: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/30.jpg)
© 2009 Research In Motion Limited
Components of a push request
Transport level:
– The BlackBerry smartphone
• Sends an acknowledgment notification when the pushed data reaches the BlackBerry smartphone
• Does not attempt to verify that the data was received by the client-side application
![Page 31: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/31.jpg)
© 2009 Research In Motion Limited
Components of a push request
Application level:
– BlackBerry smartphone
• Sends an acknowledgment notification when the pushed data reaches the client-side application
• Sends the acknowledgment to the BlackBerry MDS Connection Service, which forwards it on to the notification URL provided in the push request
– Notes
• You must register the listen port number on the BlackBerry smartphone with the BlackBerry MDS Connection Service before you can make application-reliable push requests.
• If you are pushing data to the BlackBerry Browser, the port is preregistered.
![Page 32: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/32.jpg)
© 2009 Research In Motion Limited
Components of a push request
Application preferred level:
– Only the RIM push format supports the application preferred reliability level.
– If the BlackBerry smartphone supports application-level reliability it sends an acknowledgment notification when the pushed data reaches the client-side application.
– If the BlackBerry smartphone does not support application-level reliability, it sends an acknowledgment notification when the pushed data reaches the BlackBerry smartphone.
![Page 33: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/33.jpg)
© 2009 Research In Motion Limited
Components of a push request
Application preferred level:
– Register the listen port number
– Not available with the PAP push format
![Page 34: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/34.jpg)
© 2009 Research In Motion Limited
Components of a push request
Time restrictions for push delivery:
– Define an expiry time during which pushed data must be delivered to the recipient BlackBerry smartphones
– Set two time stamps to specify time restrictions
• Deliver before time stamp
• Deliver after time stamp
![Page 35: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/35.jpg)
© 2009 Research In Motion Limited
Components of a push request
To specify time restrictions for push delivery using the PAP push format:
– Define one or both of the deliver-after-timestamp and the deliver-after-timestamp attribute for the <push-message> element of the control entity.
To specify time restrictions for push delivery using the RIM push format:
– X-Rim-Push-Deliver-Before and X-Rim-Push-Deliver-After header in the request.
![Page 36: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/36.jpg)
PAP push format
© 2009 Research In Motion Limited
![Page 37: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/37.jpg)
© 2009 Research In Motion Limited
PAP push format
Send three types of requests:
– Push request
• Pushes data to the specified recipients
– Status query request
• Queries the status of a push request for one or more specified recipients
– Cancellation request
• Cancels a push request for one or more specified recipients
![Page 38: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/38.jpg)
© 2009 Research In Motion Limited
PAP push format
The PAP push format:
– Sends the request as an HTTP POST request to the BlackBerry MDS Connection Service
– Use the format:
POST http://<MDS_CS>:<MDS_CS_port>/pap
<message>
If the BlackBerry MDS Connection Service is configured to support secure connections, you can use the HTTPS protocol.
![Page 39: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/39.jpg)
© 2009 Research In Motion Limited
PAP push format
Create a PAP push request:
1. Send an HTTP POST request.
2. To push content to multiple recipients using PAP, add multiple address tags to the POST request.
3. To push content to a group using PAP, in the recipient addresses part of the push submission, prefix the group name with the $character.
Example: an address element used to push to a group named IT using PAP:
<address address-value="WAPPUSH=%24IT/[email protected]"/>
![Page 40: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/40.jpg)
RIM push format
© 2009 Research In Motion Limited
![Page 41: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/41.jpg)
© 2009 Research In Motion Limited
RIM push format
Send the request as an HTTP POST request to the BlackBerry MDS Connection Service:
POST http://<MDS_CS>:<MDS_CS_port>/push?
DESTINATION=<destination>&PORT=<client_port>&REQUESTURI=<uri>
<headers>
<data>
![Page 42: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/42.jpg)
© 2009 Research In Motion Limited
RIM push format
To push content to:
– One or multiple users, send an HTTP POST request
http://mdsServer:web server listen port/push?DESTINATION=
– Multiple recipients, include multiple DESTINATION parameters in the query string
http://mds_server:8080/push?DESTINATION=
[email protected]&[email protected]&PORT=7874&REQUESTURI=/
– A group, prefix the group name with the $character
![Page 43: Introduction to push technology © 2009 Research In Motion Limited](https://reader035.vdocument.in/reader035/viewer/2022070412/56649d135503460f949e6527/html5/thumbnails/43.jpg)
© 2009 Research In Motion Limited