IT tutorials
 
Mobile
 

BlackBerry Development : Pushing Data to Internal Users - Browser Push

4/12/2013 9:42:03 PM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

The BlackBerry browser is a supported target for pushed data. A typical browser (be it desktop or mobile) is normally used to request pages or content from a server, review the content, and submit information back to a server. It is a simple process.

Most mainstream browsers provide support for subscribing to RSS feeds. Because of its name, many users believe the data is fed into the browser. What happens with RSS is that the browser periodically checks the feed for new data and downloads new articles that have become available since the last check.

For the BlackBerry Browser Push, it’s slightly different. An application is not pushing data to the browser, what the application does is push content to the device that, when accessed, is opened in the BlackBerry browser. There are three types of Browser Pushes you can perform to a device: Channel Push, Message Push, and Cache Push. You can also delete a Browser Channel by using the Browser Channel Delete operation. Table 1 summarizes these options, which are described in detail in the following sections.

Table 1. Comparison of Browser Push Types
 Custom IconUser NotificationDestinationContent TypesSubsequent Push Overrides
ChannelYesYesHome ScreenHTML and URLYes
MessageNoYesMessages ApplicationHTML and URLNo
CacheN/ANoBrowser CacheAny web contentYes

The best part about browser push is that, unlike any other mobile application, when you build browser push applications for BlackBerry, you are building applications without writing any program code for the mobile device. Except for the content, the HTML pages, or other content being delivered to the browser, all the development for this process is done in the backend push application, not on the target device.

When building browser push applications, a developer can use any development language he wants because the push process doesn’t involve code that runs on the BlackBerry. The push process happens in the background, between the push application and BES components; there is no user’s involvement or intervention in the process. With this technology, an organization can leverage existing development skills the company has without ever having to learn how to write applications for a mobile device.

1. Channel Push

With Channel Push, the push application pushes a web page or the page’s URL to the device. The page appears as an icon on the BlackBerry Home Screen.When the mobile user clicks the icon or opens the channel, the browser opens and displays the page. It’s better to push a page rather than a URL so the page is stored on the device and available even if the device has gone out of network coverage.

The Power in Channel Icons

A developer can do some interesting things with the icon that is pushed with the channel. When a Channel Push is sent to a device, the push request includes the URLs for two icons associated with the channel. The icons are Read and Unread icons and the device uses them to indicate when there has been new data pushed to the channel. As soon as the channel has been received by the device, the browser accesses each icon’s URL to retrieve the icons from a server. When a channel first appears on a device, the icons take a while to appear on the screen; a default browser icon is used until the channel’s icons are retrieved from the server by the browser. You can use Cache Push (described later) to deliver the icons to the device cache in advance of the Channel Push, but that is likely not worth the effort because the icons will appear moments after the pushed content is delivered to the device.

The Unread icon displays until the mobile user opens the channel; as soon as the channel is opened, the icon switches to the Read icon. This gives the user a visual indication whether new data is available in the channel, which is similar to what the user can do with the Messages application.

These icons can impart some information about the nature of the data behind the channel. Rather than use two static icons for the channel, because you can push new icon URLs with each push request, you can use icons that represent the state of the data in the channel with every push.

Here are some examples of how Channel Push can be used:

  • Sales Management: A company might use a sales-management application that pushes regular updates on progress toward quota. The data might be pushed via a Browser Channel and the employee’s progress toward quota represented in the icon. The application might use a red icon when the sales numbers are below quota and a green icon when the sales person has exceeded the daily quota. It can even show the percentage against quota as a number within the icon. The sales people can pull the device out of the holster, take a quick glance at the screen, and know where they stand, without ever opening the application.

  • Brewery: For a brewery that wants to keep the Brewmaster informed on the status of his brew vats, assuming vat temperatures were maintained in a relational database. The typical approach might be to build a client application that periodically queried the database. With Channel Push, updating the Brewmaster could happen automatically. A triggered procedure could run when any of the temperatures goes above or below pre-defined thresholds. When the temperatures change, an application can build a summary of the vat temperatures in HTML format and push the page to any interested party. The channel’s icon can indicate whether there is a problem or not: red if any of the temperatures are too high, blue if any of the temperatures are too low, and a frothy yellow color when the temperatures are just right!

  • IT Management: An IT organization can use push to deliver a summary of current issues within the environment. Instead of filling everyone’s inbox with alerts and alert cancelation messages, a channel can list a summary of the current conditions. The channel’s icon can use color to indicate alert level and show the number of critical alerts on the icon.

How Push Changes the Way You Think about Mobile Applications

The brewery concept came from a sales contest RIM sponsored for one of the U.S. wireless carriers. We were promoting mobile applications and asked them to create a proposal for that scenario. Being smart people, they immediately started thinking about the middleware they might need to connect to the database and what type of rich client application was needed for the device. The solution I described here, however, allowed a solution to be developed without any middleware (except for MDS, of course, but an organization would already have that) and without any client application code being developed for the BlackBerry device. The organization could use the skills it already had in-house to build a simple web page (using HTML) that was pushed to the device. Because the channel icon imparts information to the user, the application doesn’t even have to be opened to see how things are doing back at the brewery.


To see how channel icons can look on a device, look at Figure 1 and Figure 2. Figure 1 shows an unread icon, which is an icon indicating that there is new data behind the channel. Figure 6.2 shows the read icon for the same channel, which indicates that the channel has been opened since the data was pushed.

Figure 1. Sample Browser Channel unread icon


Figure 2. Sample Browser Channel read icon


A
Browser Channel can display a completely different icon depending on the data included with the push. The AccuWeather Web Signal icon shows the weather conditions for the location being monitored. The icon shows a sunny sky when it’s sunny outside, rain clouds when it’s raining, and snow through most of the winter. This is just another example of how the channel icon can impart information.

If you push a Browser Channel and don’t specify a read and/or unread icon for the channel, the BlackBerry uses a default, generic icon for the channel included with the device theme.

Overwriting Pushed Data

When pushing data to a channel, any new push to the channel overwrites the previous channel data—there is no history maintained on the device. If a push application is pushing new data but there’s also some legacy information that needs to be included as well (data from a previous push, for example), the push application must push all of the data every time, both the old and the new. Because complete web pages are being pushed, the developer cannot expect that new data just appends to the end of what is already there.

Pointing to the Portal

Many organizations use Browser Channels as a way to place an icon for the company’s portal on every BlackBerry device. In this case, they simply push the URL for the portal down once and it’s there any time the user needs it. If the portal URL ever changes, they merely rerun the push and push the new portal location to the channel. Another option is to build and deploy a simple Java application that launches the portal URL when opened.

Storing the Page

When you push a channel to a device, you must store the HTML page on a web server so it can be accessed by the device when needed. By default, the BlackBerry browser only stores information in its cache for a limited amount of time (approximately 12 hours, but that’s no guarantee). If the device’s internal routines that manage memory determine that it needs the memory being used to store your page for a more important purpose, the local copy of the page may be deleted. If the page is purged from the device, the BlackBerry browser just goes to the web server and retrieves a new copy of the page when it needs it.

A push application can set an extended expiration date for the content when the content is pushed to the device. There is still no guarantee that the data remains if the device truly needs the memory for something more important or if the user clears the cache.

Number of Channels

A device can support many channels. There is likely a limit to the number of channels you can have on a device, but if you bump up against the limit, the user probably already has other problems. When organizations start deploying channels, they must think carefully about the impact on mobile users. If a user is monitoring one, two, or even up to about five channels, it’s probably not too difficult for the user to pay attention to. But, if the user has to manage the contents of her inbox plus deal with many separate channels, it quickly becomes more difficult. You might end up losing the benefits you could be getting from this feature by overloading the user with channels.

Notifying the User

The question that mobile developers ask most often is, “Can I notify the user when there’s new data?” The answer is yes, and the user even gets to decide how he is notified. If you look at a BlackBerry device, there is an application icon somewhere labeled Profiles. On the BlackBerry Bold Smartphone, it’s a speaker icon in the upper-left corner of the screen, as shown in Figure 3.

Figure 3. BlackBerry device Profiles


When you open the Profiles application, a menu appears that lists the profiles currently defined on the device. Each profile defines a series of alert settings for each of the possible alerting applications running on the device. Scroll to the bottom of the list and highlight the item labeled Advanced, as shown in Figure 4. Click the trackball or press the Enter key to open the item, and a screen appears that shows another list of the profiles.

Figure 4. BlackBerry Profiles menu


Select one of the profiles (it doesn’t matter which), click the BlackBerry menu button, and select Edit from the menu that appears, as shown in Figure 5.

Figure 5. Edit Profile


Figure 6.6 shows the different options for the selected profile. Select the option labeled Browser, as shown in Figure 6. This alert gets triggered when pushed browser data is received by the device.

Figure 6. Selecting Profile Option to Modify


In Figure 7, you see the options available to configure this profile for how the user will be alerted. You can define options for when the device is holstered and when it’s out of the holster. You can have a tone played, have the device vibrate, or both. You can even specify the volume and number of beeps and/or vibrations for the alert.

Figure 7. Profile option in Edit mode


When you finish making changes, press the BlackBerry menu button, select Save to save your changes, and close the Profile Editor.

Limitations of Channel Push

Browser Channel Push should only be used for delivering information to a BlackBerry that does not have to be available at all times on the device. When you push a web page to a channel, it’s possible that the device will purge the page from cache after a specific amount of time (12 hours by default) or if there is some critical need for the memory for some other application. This isn’t a problem for most channels because the browser will access the page on the server if the copy it needs is no longer available locally. If the application’s target users need to have access to the page at all times and if they’re without network connectivity or if the server that hosts the page is no longer available (because of some catastrophe, for example), the page will not be available. If the pushed data must be available at all times, push the data to a Java application instead, as discussed shortly.

Removing Browser Channels

It is possible to delete a channel from the device when the mobile user no longer wants to receive the information or when the channel is no longer being pushed. To delete the channel, open the browser and access the Bookmarks page, as shown in Figure 8. At the bottom of the list is an expandable section called Browser Channels. When this section is expanded, a list of all the channels is displayed.

Figure 8. Browser Channel listing in Browser Bookmarks


Highlight the channel you want to delete (shown in Figure 8 as a local weather report) and press the BlackBerry Menu button. From the menu that appears (see Figure 9), select Delete Channel, and the channel is removed from your device.

Figure 9. Deleting a Browser Channel


With BlackBerry Device Software version 4.6 and beyond, the channel can be deleted directly from the BlackBerry Home Screen. To do this, highlight the channel, press the BlackBerry menu button, and select Delete Channel from the menu that appears, as shown in Figure 10.

Figure 10. Deleting a channel directly from the Home Screen


Note

If you delete the channel but if the channel data is still being periodically delivered to your device by a push application, the channel will reappear the next time a push occurs for that channel. Be sure to unsubscribe from any active channels before you delete them.


The developer can make unsubscribing from the push easy by including an X-RIM-PUSH-DELETE-URL parameter with the push request. This URL is triggered when the user deletes the channel icon from her device. Developers should create code to automatically delete the user from the push application when the URL is triggered.

2. Message Push

Message Push works just like Channel Push except that, instead of the page appearing as a separate icon on the ribbon, the pushed web page or URL appears as a message in the device’s Messages application, as shown in Figure 11. The message has a special globe icon to indicate that it’s pointing to a browser URL. When the user opens the message, the browser opens and renders the page.

Figure 11. Messages application showing a pushed message


Note

With Message Push, the messages only appear in your BlackBerry Messages application; they do not appear in your desktop messaging system inbox.


Message pushes are different than Channel Pushes because, with Channel Push, any subsequent push overwrites the previous push, but with Message Push, each subsequent push becomes a separate icon in the Messages application.

Use Message Push when you want to deliver pushed data to a BlackBerry device only, and you have some interest in being able to continue to see the content pushed previously. Imagine, for example, if you were working with a group of service technicians or delivery personnel: These users might not have corporate email accounts (but likely personal ones) on their BlackBerry devices, but you could dispatch them to new service calls or package pickups via message push.

3. Cache Push

Cache Push allows browser content (web pages, input forms, graphics, style sheets, JavaScript files, and more) to be pushed to the device’s browser cache without the user’s knowledge; the content will be there whenever the user needs it. The difference between this and Channel Push is that, for Cache Push, the user is not alerted when the content appears on the device, and the cached page does not automatically get represented as an icon on the ribbon. This option allows content to be available when the device is not within wireless coverage or to save retrieving data for review or a form for data entry.

A good use for Cache Push is for pushing the ancillary files a Channel Push needs (channel icon, CSS, JavaScript libraries, image files, and so on) onto the device so they won’t have to be retrieved from the network when the channel is opened.

Note

When pushing an HTML page to the browser cache, only the HTML data gets pushed to cache. If the HTML page contains references to external resources, such as images, style sheets, and JavaScript files, your push application needs to parse the source HTML page looking for any linked references and separate content pushes for each additional resource.

 
Others
 
- BlackBerry Application Data Push : How the Application Data Push Process Works
- Windows Phone 8 : Controls - Data Binding (part 4) - Control Templates
- Windows Phone 8 : Controls - Data Binding (part 3) - Data Binding Errors
- Windows Phone 8 : Controls - Data Binding (part 2) - Improving Scrolling Performance, Binding Formatting, Converters
- Windows Phone 8 : Controls - Data Binding (part 1) - Simple Data Binding, Using a DataTemplate
- iPhone SDK 3 : Making Connections with GameKit and Bonjour - iPhone to iPhone Gaming Via BonjourHelper
- iPhone SDK 3 : Making Connections with GameKit and Bonjour - Working Around Real-World GameKit Limitations
- Android : Getting Fancy with Lists - Interactive Rows
- Android : Getting Fancy with Lists - Better. Stronger. Faster.
- Windows Phone 7 : Designing the Game Framework (part 3) - The GameHost Class
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us