Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2009 Research In Motion Limited Advanced Java Application Development for the BlackBerry Smartphone Trainer name Date.

Similar presentations


Presentation on theme: "© 2009 Research In Motion Limited Advanced Java Application Development for the BlackBerry Smartphone Trainer name Date."— Presentation transcript:

1 © 2009 Research In Motion Limited Advanced Java Application Development for the BlackBerry Smartphone Trainer name Date

2 © 2009 Research In Motion Limited Agenda In this course, you will cover the following topics: –Introduction to advanced mobile application development for the BlackBerry ® smartphone –Application control for mobile devices –Optimization for mobile application development –Advanced BlackBerry user interface –Introduction to multimedia application development for the BlackBerry smartphone –Understanding push technology

3 © 2009 Research In Motion Limited Agenda In this course, you will cover the following topics: –Understanding client/server push –Introduction to developing Bluetooth ® applications for mobile devices –Developing secure applications

4 Advanced Java Application Development for the BlackBerry Smartphone Objectives –Explain client/server push and describe the benefits of push –Explain how to write a basic client-side push application –Explain how to write a basic server-side push application –Describe and use the various features of push reliability © 2009 Research In Motion Limited

5 Explain client/server push

6 © 2009 Research In Motion Limited Client/server push –Client/server push applications send data from a server-side application to a custom client application on the BlackBerry smartphone. –Requires a custom client application –Provides more control than browser push applications

7 © 2009 Research In Motion Limited Client/server push –Two applications are involved in client/server push: A server-side push application A client-side listener

8 © 2009 Research In Motion Limited Writing a basic client-side push application –A client-side push application requires a listening thread –Applications send and receive data on a separate thread –Basic client-side push application: Verify that the client BlackBerry smartphone is in a wireless coverage area Open an input stream Close the stream connection notifier

9 Overview of the PAP push format © 2009 Research In Motion Limited

10 Overview of the PAP push format –Server-side applications can use the PAP push format to send three types of requests: Push request Status-query request Cancellation request –All three requests are sent as an HTTP POST to the BlackBerry MDS Connection Service PAPPush Access Protocol HTTPHyper-text transfer protocol MDSmobile data system

11 © 2009 Research In Motion Limited Overview of the PAP push format Constructing a PAP control entity –A PAP control entity is an XML document which contains the control information that is required by the Push Access Protocol –It must be the first entity in a push request –All PAP control entities have three common document elements XMLExtensible markup language

12 Overview of the RIM push format © 2009 Research In Motion Limited

13 Overview of the RIM push format –Server-side applications can use the RIM push format to send both the data and delivery parameters to the BlackBerry MDS Connection Service in a single byte stream –The request is sent as an HTTP POST request using the following format: POST http:// : /push? DESTINATION= &PORT= & REQUESTURI= XMLExtensible markup language

14 © 2009 Research In Motion Limited Overview of the RIM push format –HTTP headers for the RIM push format –Receiving a RIM push format result notification –Response codes for the RIM push format XMLExtensible markup language

15 Writing a basic server-side push application –To write a basic server-side push application, complete the following steps: 1.For PAP push, specify the push parameters. (For RIM push, the parameters are specified as part of the Push web address.) 2.Connect to the BlackBerry MDS Connection Service 3.Define the properties for the HTTP POST request. 4.Write data to the server connection. 5.Read the server response. 6.Close the server connection. © 2009 Research In Motion Limited

16 Creating a push request © 2009 Research In Motion Limited

17 Creating a push request –A push request is made up of the data to be pushed and a set of delivery parameters –Both the PAP push and RIM push formats support the following features: Reliable push requests Deliver-Before time stamp Deliver-After time stamp © 2009 Research In Motion Limited

18 Creating a push request –In addition, the PAP push service implementation supports the following features: Push cancellation Push status query © 2009 Research In Motion Limited

19 Creating a push request Pushing data to multiple BlackBerry smartphone users –Submit a single push request for multiple BlackBerry smartphone users –Two methods to send to multiple email addresses are: By specifying multiple email addresses or BlackBerry smartphone PINs in the push request By specifying a BlackBerry user group (which specifies multiple recipients using a single address) in the push request © 2009 Research In Motion Limited

20 Creating a push request Pushing data to multiple recipient addresses –Pushing data to multiple recipient addresses rather than a BlackBerry user group allows you to do the following for individual recipients: Cancel Query Receive result notifications © 2009 Research In Motion Limited

21 Creating a push request Pushing data to multiple recipient addresses –Can result in large push requests which might cause issues, such as URL limitations –To push data to multiple recipient addresses: For PAP push include an element for each intended recipient For RIM push include a separate destination parameter for each intended recipient © 2009 Research In Motion Limited

22 Creating a push request Pushing data to a BlackBerry user group –BlackBerry user groups are administered on the server and represent multiple recipients using a single address –The group is seen as a single entity which limits flexibility of a push application © 2009 Research In Motion Limited

23 Creating a push request Pushing data to a BlackBerry user group –To push data to a group: PAP push include a single element RIM push include a single DESTINATION parameter © 2009 Research In Motion Limited

24 Creating a push request Using push request reliability –To receive notifications on a push request, specify the reliability level and a notification URL –If a custom client is receiving the pushed data the port must be registered on the BlackBerry MDS Connection Service –If the pushed data is sent to the BlackBerry Browser the port is already registered © 2009 Research In Motion Limited

25 Creating a push request Using push request reliability –Only BlackBerry Device Software versions 3.8 or later support application reliable push requests –Application-reliable push requests that do not require registration, develop your application so it sends an HTTP request –To specify a reliable push request: PAP push include the element RIM push include the x-Rim-Push-Reliability header © 2009 Research In Motion Limited

26 Creating a push request Using push request reliability –Levels of reliability Transport Application Application - preferred © 2009 Research In Motion Limited

27 Creating a push request Receiving push result notifications –application-level or transport-level reliability push requests require a valid notification URL –The BlackBerry MDS Connection Service sends all result notifications to the notification URL as an HTTP POST © 2009 Research In Motion Limited

28 Creating a push request Specifying time restrictions for push delivery –Define a delivery period for delivering the pushed data Deliver-after date and time Deliver-by date and time © 2009 Research In Motion Limited

29 Creating a push request Querying the status of push requests –Query the status of the push request for one or more recipients –Zero recipients returns a status for all the recipients, specify one or more to return limited results –Groups only return a status for the entire group –Can result in unnecessary network traffic © 2009 Research In Motion Limited

30 Creating a push request Cancelling a pending push request –Cancelation requests are possible using PAP push format –Zero recipients returns a status for all the recipients, specify one or more to return limited results –Groups only return a status for the entire group –If the request is still pending cancelation is possible, recall of sent data is not possible © 2009 Research In Motion Limited

31 Summary © 2009 Research In Motion Limited

32 Summary –Client/server push applications send data from a server-side application to a custom client application. –A client-side push application requires a listening thread and sends and receives data on a separate thread. –You can use any programming language that can establish an HTTP connection to create a server- side push application. © 2009 Research In Motion Limited

33 Summary –A push request can require a server-side application to be notified when pushed data arrives © 2009 Research In Motion Limited

34

35 Legal Disclaimer The following trademarks and/or registered trademarks of Research In Motion are referred to in this presentation: –BlackBerry® The following BlackBerry products are referred to in this presentation: –BlackBerry® Enterprise Server © 2009 Research In Motion Limited

36 Legal Disclaimer © 2009 Research In Motion Limited. All rights reserved. BlackBerry®, RIM®, Research In Motion®, SurePress™ SureType® and related trademarks, names and logos are the property of Research In Motion Limited and are registered and/or used in the U.S. and countries around the world. All other trademarks are the property of their respective owners. This documentation is provided "AS IS" and without condition, endorsement, guarantee, representation or warranty, or liability of any kind by Research In Motion Limited and its affiliated companies, all of which are expressly disclaimed to the maximum extent permitted by applicable law in your jurisdiction.


Download ppt "© 2009 Research In Motion Limited Advanced Java Application Development for the BlackBerry Smartphone Trainer name Date."

Similar presentations


Ads by Google