Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to BlackBerry Smartphone Web Development —Introduction to Browser Push Trainer name Date V1.00 © 2009 Research In Motion Limited.

Similar presentations


Presentation on theme: "Introduction to BlackBerry Smartphone Web Development —Introduction to Browser Push Trainer name Date V1.00 © 2009 Research In Motion Limited."— Presentation transcript:

1 Introduction to BlackBerry Smartphone Web Development —Introduction to Browser Push Trainer name Date V1.00 © 2009 Research In Motion Limited

2 Agenda In this course, you will cover the following topics: –Introduction to Mobile Device web development –Web development tools for mobile devices –The BlackBerry Infrastructure –Optimizing Web Content for Mobile Device Browsers –Introduction to Browser Push –Widgets

3 Introduction to BlackBerry Smartphone Web Development Objectives –Define and explain Browser Push –List the advantages and disadvantages of Browser Push –Describe and explain the importance of the types of Browser Push, such as Browser Channel, Browser Message, Browser Cache, and Browser Channel-Delete –Explain how to write a Browser Push application –Describe how mobile applications have benefited from Browser Push, such as push messaging from the BlackBerry® Enterprise Server –Describe and use the transcoding feature of Browser Push

4 © 2009 Research In Motion Limited What is Browser Push?

5 –Browser Push is how your information, such as weather updates, is automatically sent to your BlackBerry smartphone without you requesting it. –Browser Push pushes information from a web application to your BlackBerry smartphone as it becomes available. –Updates appear in a message list or on the Home screen of a BlackBerry smartphone. –Updates are also pushed to your browser cache without notifying you.

6 What is Browser Push? –A server-side application is created to send content to BlackBerry smartphones through BlackBerry® Enterprise Server for MDS Applications. –BlackBerry MDS® Integration Service includes a Browser Push engine that can poll specific web addresses for updates and push the web content to BlackBerry smartphones at intervals developers specify. © 2009 Research In Motion Limited MDS Mobile Data System

7 Components of a Push Application Service A Push Application Service comprises three components: –Server-side push service (offers data) –Client-side application (makes use of the data) –BlackBerry® Infrastructure (middleware that receives requests to push data and delivers the data) © 2009 Research In Motion Limited

8 How the BlackBerry Push API works 1.Content provider sends a PAP push request to the BlackBerry Infrastructure. Request includes a list of subscribed BlackBerry smartphones and the data to be delivered to them. 2.BlackBerry Infrastructure returns a response to the content provider acknowledging receipt of the request and queues the request for delivery. © 2009 Research In Motion Limited PAP Password Authentication Protocol

9 How the BlackBerry Push API works 2.BlackBerry Infrastructure pushes the data to the specified BlackBerry smartphone. 3.BlackBerry smartphone returns a response to the BlackBerry Infrastructure, acknowledging receipt of the data. 4.The BlackBerry Infrastructure forwards the acknowledgement on to the content push initiator. 5.The Read notification is returned to the BlackBerry Infrastructure. © 2009 Research In Motion Limited

10 Advantages of Browser Push –Send information to the browser in a variety of ways regardless of back-end server technology. –Leverage industry standards such as PAP or use simplified BlackBerry push technology. –Greatly reduce amount of data being sent or received while users wait for updates. –Applications can be written in most server-side languages and process is controlled from server side. –Push applications are easy to write and push requests refresh the currently cached copy. © 2009 Research In Motion Limited

11 Disadvantages of Browser Push –Data format is limited to what the BlackBerry® Browser can handle or what an application can decode. –Longer development time is required for push applications than for static pages. –Additional expensive software and faster, more efficient computers are needed to run push software. –Downloading of files can fill hard disk. –Content delivery may cause bandwidth problems. –Security safeguards are needed. © 2009 Research In Motion Limited

12 Types of Browser Push

13 Browser Channel Push –Browser Channel Push─Sends a web page and two icons to the BlackBerry smartphone. Web page is stored in cache of BlackBerry Browser and an icon is shown on the Home screen of the smartphone. –You must uniquely identify a browser channel by using a channel ID, specified by the X-Rim-Push-Channel- ID header. –If a channel with the same channel ID already exists on the device, the associated content is replaced by the new content.

14 Browser Channel Push –To push to a browser channel, specify a value of browser- channel for the X-Rim-Push-Type header. Include the X-Rim-Push-Channel-ID header to specify a unique identifier for the channel. © 2009 Research In Motion Limited

15 Browser Channel Push –Optional HTTP headers include the following: © 2009 Research In Motion Limited HeaderDescription X-Rim-Push-Title Specifies a title used to identify the push application on the Home screen X-Rim-Push-Unread-Icon- URL Specifies the URL for the icon image that is displayed on the Home screen when new content has arrived X-Rim-Push-Read-Icon- URL Specifies the URL for the icon image that is displayed after the pushed content has been viewed X-Rim-Push-Delete-URL Specifies the URL to which notifications are sent if the user deletes the channel from the Home screen

16 Browser Channel Delete Push –Browser Channel Delete Push─Works opposite of Browser Channel Push as it removes an icon from the BlackBerry smartphone Home screen. –There are two ways that a browser channel can be deleted from the Home screen: 1.The server-side push application can submit a browser channel delete request to delete the browser channel. 2.The user can delete the browser channel manually. © 2009 Research In Motion Limited

17 Browser Channel Delete Push –To delete a browser channel, specify a value of browser-channel-delete for the X-Rim-Push- Type header. –If you specify a value of browser-channel-delete, you must also include the X-Rim-Push-Channel-ID header to indicate which channel should be deleted. –You can include the X-Rim-Push-Delete-URL to specify a URL to which a notification is sent when the user deletes the channel. © 2009 Research In Motion Limited

18 Browser Cache Push –Browser Cache Push─Pushes web content to the cache of the BlackBerry Browser on users’ BlackBerry smartphones. –A server-side application can push content directly to the BlackBerry Browser cache. The user receives no notification indicating that new content is available, but the next time that the user visits the specified URL, the browser retrieves the content from the cache. © 2009 Research In Motion Limited

19 Browser Cache Push –Browser cache push requests can be used in conjunction with browser channel push requests or browser message push requests to preload the cache with external resources, such as images or style sheets, that might be referenced by other pushed content, but are not included. –To push to the BlackBerry Browser cache, specify a value of browser-content for the X-Rim-Push- Type header. You can also choose to include the X- Rim-Push-channel-ID header, which specifies the channel ID of the browser channel with which to associate the content. © 2009 Research In Motion Limited

20 Browser Message Push –Browser Message Push─Arrives in the Inbox on the BlackBerry smartphone to provide a link to new or updated web pages. It is stored as a browser message instead of in the BlackBerry Browser’s cache. –This means that the page is available until the user deletes the message. It is not removed from the BlackBerry Browser cache when other events (browsing, cache clear) take place. © 2009 Research In Motion Limited

21 Browser Message Push –To push content to the messages application, specify a value of browser-message for the X-Rim-Push- Type header. You can also choose to include the X- Rim-Push-Title header, which specifies a title used as the subject of the message when it appears in the messages application. © 2009 Research In Motion Limited

22 Data Push –Data Push─Transmitted to the BlackBerry smartphone with the expectation that a customer listener, as opposed to the browser, has been set up to accept the pushed data. © 2009 Research In Motion Limited

23 Browser Push options –Process MDS─Set whether your BlackBerry smartphone accepts Browser Push messages from the BlackBerry Enterprise Server or BlackBerry Internet Service. –MDS Hosts─Set whether your BlackBerry smartphone accepts push messages from all BlackBerry Enterprise Servers or BlackBerry Internet Services or no BlackBerry Enterprise Servers or BlackBerry Internet Services © 2009 Research In Motion Limited

24 Browser Push options –Process SMSC─Set whether your BlackBerry smartphone accepts SMS-based Browser Push messages –SMSC Hosts─Set which SMCS hosts your BlackBerry smartphone accepts Browser Push messages from © 2009 Research In Motion Limited SMSC Short Message Service Center

25 Browser Push options –Process IP─Set whether your BlackBerry smartphone accepts Browser Push messages that web applications send through a WAP gateway –IP Hosts─Set which WAP gateways your BlackBerry smartphone accepts Browser Push messages from © 2009 Research In Motion Limited

26 © 2009 Research In Motion Limited Writing a Browser Push application

27 You can use three methods to create BlackBerry smartphone applications: 1.Create a web site to be accessed using the BlackBerry Browser. 2.Develop a server-based application that pushes content to the BlackBerry smartphone. 3.Write a software application that operates on the BlackBerry smartphone or a remote server.

28 Design considerations –Consider the type of information that users need pushed to them. –Consider how often to push the information. –Consider having users subscribe to the push information they require. © 2009 Research In Motion Limited

29 Design overview Development of most push applications requires the following tasks: –Create a web address for the location where you post data. –Fetch or create the content for the push application. –Identify the email addresses or BlackBerry smartphone PINs of content recipients. © 2009 Research In Motion Limited PIN Personal Identification Number

30 Push Application process flow 1.The push application sends an HTTP POST request to the BlackBerry MDS as follows: Post/push?destination= &port=7874 &REQUESTURI= 2.The BlackBerry MDS receives the HTTP request. It stores the destination and port information, and then formats the request. Post © 2009 Research In Motion Limited HTTP Hypertext Transfer Protocol

31 Push Application process flow 3.If applicable, the BlackBerry MDS applies a transcoder according to its transcoder rules. 4.The BlackBerry MDS sends the content to the BlackBerry smartphone. © 2009 Research In Motion Limited MDS Mobile Data System

32 © 2009 Research In Motion Limited How Browser Push benefits mobile applications

33 Browser Push offers the following benefits: –Provides information immediately –Optimizes network efficiency –Preserves the battery life of the BlackBerry smartphone –Reduces complexity for developers –Improves developer margins by engaging users

34 Delivering pushed content The level of support for pushing content depends on the network gateway: –BlackBerry MDS Connection Service─Offers the most support for pushed content delivery using RIM Push and WAP PAP Push protocols –BlackBerry Internet Service Browsing─Content is pushed through web signals and does not require the BlackBerry Enterprise Server. © 2009 Research In Motion Limited

35 Delivering pushed content The level of support for pushing content depends on the network gateway (cont): –WAP network gateways─To support pushed content delivery, the WAP Push service record must be provisioned on the BlackBerry smartphone. © 2009 Research In Motion Limited

36 Browser Push Transcoding

37 Browser Push transcoding –If configured to do so, the BlackBerry® MDS Connection Service automatically transcodes pushed content before it sends it to the BlackBerry Browser. –Transcoding means changing the pushed resources into formats that are suitable for sending over the wireless network and for rendering in the BlackBerry Browser. –Push requests can override the transcoding rules configured for the BlackBerry MDS Connection Service using the X-Rim-Transcode-Content header. © 2009 Research In Motion Limited

38 Browser Push transcoding –The X-Rim-Transcode-Content header can be used to specify a list of MIME types that the BlackBerry MDS Connection Service should transcode, should it encounter them. –For example, if the HTTP header X-Rim-Transcode- Content: application/xhtml+xml is set, then the BlackBerry MDS Connection Service transcodes XHTML content before pushing it to the BlackBerry smartphones. © 2009 Research In Motion Limited

39 Transcoding The Transcoder API provides the classes and interfaces for an encoding scheme for data sent to and from BlackBerry smartphones and the BlackBerry Enterprise Server located within an organization. You can use the encoding scheme to encode and decode all Gateway Messaging Envelope (GME) packets that the BlackBerry Enterprise Server sends to the BlackBerry smartphone and all GME packets that the BlackBerry smartphone sends to the BlackBerry Enterprise Server. API Application Programming Interface

40 Encoding data on the BlackBerry smartphone The process flow for encoding data on the BlackBerry smartphone entails the following steps: 1.The BlackBerry smartphone prepares a message to send. 2.If a registered Transcoder implementation exists on the BlackBerry smartphone and the message is targeted for the BlackBerry Enterprise Server through IT Policy, the BlackBerry smartphone calculates a CRC of the datagram and uses the Transcoder implementation to encode both the CRC and the datagram. © 2009 Research In Motion Limited CRC Cyclic Redundancy Check IT Internet Technology

41 Encoding data on the BlackBerry smartphone 3.The Transcoder implementation prepends the Transcoder ID to the encoded data. 4.The BlackBerry smartphone processes the encoded data using the standard BlackBerry encryption and compression process. © 2009 Research In Motion Limited ID Identification

42 Decoding data on the BlackBerry smartphone The process flow for decoding data on the BlackBerry smartphone entails the following steps: 1.The BlackBerry smartphone receives the datagram and decrypts and decompresses the data using the standard BlackBerry decryption and decompression process. 2.If the Transcoder ID prepended to the data matches the Transcoder implementation registered on the BlackBerry smartphone, the Transcoder implementation decodes the data. © 2009 Research In Motion Limited

43 Decoding data on the BlackBerry smartphone 3.The BlackBerry smartphone calculates the CRC of the decoded datagram. If the CRC matches the CRC appended to the decoded data, the transcoding succeeds. © 2009 Research In Motion Limited

44 Summary

45 In this chapter, you learned about Browser Push: –Browser Push means automatically sending information to your smartphone without you requesting it. –Information can be sent using channel, cache, or message push. –When writing a Browser Push application, consider the type of information BlackBerry smartphone users need. –Browser Push provides information immediately. –Transcoding provides encoding and decoding schemes for pushing data. © 2009 Research In Motion Limited

46


Download ppt "Introduction to BlackBerry Smartphone Web Development —Introduction to Browser Push Trainer name Date V1.00 © 2009 Research In Motion Limited."

Similar presentations


Ads by Google