Advanced BlackBerry Browser Development

If you consider yourself to be an avid BlackBerry developer, you’re probably in search of some advanced tips that will put you ahead of the game. Well, you’ve come to the right place. Here we will discuss more of the advanced features that have become available thanks to BlackBerry’s Push technology. The beauty of this development is the fact that users do not have to request the data they receive; it simply gets sent to them as soon as it becomes available.

Similarly, BlackBerry’s Push Application Programming Interface (API) enables developers to access the power of the BlackBerry Push infrastructure while infusing their Java applications with the speed that smartphone users have become accustomed to. Simply put, BlackBerry developers can now create a wide array of exciting new apps that will truly enhance the smartphone experience.

This technology is called “push”, because according to BlackBerry, that is the technique utilized by the API. Here’s a quick rundown of how it works: A notification and either URL or data are pushed to the device at which point the device is notified, and depending on the type of push will either alert the user or update the cache on the device. If channel or message push is used, the user will be notified by either an icon or a message and when they click on the notification it will launch the browser to that URL. In a nutshell, push delivers needed content or notifications to a device without the device having to request it. This data is sent to a port on the device where the application is waiting for it. There is also a Push initiator, which has a similar function. The initiator submits a request to the hosted data push service, which contains delivery instructions and the data itself that details exactly where the information is to be sent.

The BlackBerry Browser is, of course, indigenous to all BlackBerry devices that have a BlackBerry MDS account on a BlackBerry Enterprise Server. The BlackBerry Browser can be used, along with existing web content development tools, to provide integrated mobile access to a wide array of communications. Keep in mind that the BlackBerry Browser uses the BlackBerry MDS Services, which is part of the BlackBerry Enterprise Server, to provide access to this information. The BlackBerry MDS Services, in turn, carries the encrypted data between the BlackBerry Enterprise Server (who encrypts the data) and a BlackBerry device. Quite conveniently, the Push application is designed to use this same encrypted channel.

Now that’s we’ve had a general overview of how the Push technology works, let’s discuss some advanced tips and tricks that will help you develop new and exciting applications like never before.

Advanced Development

Using BlackBerry’s Push technology will enable you to create applications unlike any others, because they will be so intuitive in nature. In fact, it’s so advanced that it very well may be the only step necessary to mobilize existing applications in your organization. It could also prove to be the first step in mobilizing applications.

BlackBerry devices support three push services for BlackBerry browser content: browser channel push, browser message push, and the browser cache push. Let’s discuss all three in detail so you can have a better understanding of how to make the most of this advanced feature.

{mospagebreak title=Browser Channel Push}

The browser channel push feature enables applications to push web pages that create or update BlackBerry browser channels on the smartphone device. These channels are displayed as an icon on the smartphone’s home screen, similar to the application icons that are featured on BlackBerry devices. Essentially, a browser channel creates a browser-based app on the smartphone that allows users to receive these data updates. A browser channel can also create what’s known as an entry point to an enterprise portal or main page, which defines other web-based apps.

When a BlackBerry receives a browser channel push message, the device will automatically create a new channel or update an older, already-existing one. Once this new channel is added or updated, a small icon on the screen will alert the user that new content is available for them to view and when the user clicks on the icon, the browser will be launched to that URL.

Managing browser channel push requests will also prove to be quite easy for developers. The requests include a channel identifier whose job it is to describe the channel. Push applications can effectively delete a browser channel and remove the icon from the screen of the smartphone by simply sending yet another   push request, which will include the ID of the channel that’s in need of being deleted.

Browser Message Push

The browser message push feature enables applications to push web pages or alerts to a BlackBerry. The messages that are created using a message push are sent directly to the smartphone and displayed along with e-mail messages in the device’s messages list. When the recipient opens the push message, the default browser featured on the smartphone starts and then opens the page. Through this process the message is not sent to the recipient’s desktop computer messaging list.

The message push content can include three main items: a descriptive title, a URL, and the content in the browser message. The title will display in the message list, while the URL enables users to open the message directly from the browser message. The full content of the browser message can be viewed so that the browser features the pushed content right away. Web pages are also stored as browser messages in the device’s cache because content referenced in the web page, such as images, graphs, etc., are not included in the pushed content. That type of information will be downloaded once the user opens the page.

{mospagebreak title=Browser Cache Push}

Applications developers create can now push content directly to the BlackBerry browser cache. This advanced feature will prove to be particularly helpful, as it allows users to access pages from a local cache at any time, even when they’re well outside of the wireless coverage area.

Cache push content can now also be associated with a specific channel. If you specify a channel identifier, the content URL will be added to the appropriate channel. If you don’t specify a channel identifier, the content will be added to the persistent cache. The user will have no idea that this content has been updated, but the next time they visit the specified URL, the BlackBerry browser can retrieve the content from the cache.

Developers can now create applications that push data to the browser cache with what can only be described as an expiration date. Developers can increase or decrease the amount of time the cache memory stores content simply by including a date and time in the “expires” header in the push requests HTTP header.

Like most BlackBerry technology, Push is easy to use and even easier to take full advantage of. When you begin to develop push apps, you should consider the types of information your users might need pushed to them and then determine how often you should push that information. You should also consider having your users subscribe to the push information they require the most, which will enable them to manage their own subscriptions. When you begin to design a push application, just keep in mind that it requires that you create a URL for the location you will post the data, create the content for the push app, and identify the addresses of those you want to send the message to. Anything beyond that is entirely up to you and your imagination.

Google+ Comments

Google+ Comments