Pushing HTML Content to a BlackBerry
Introduction
BlackBerries, developed by Research In Motion (RIM), have become a critical part of many corporate networks including IT, financial, and government networks. Their always connected nature and rich content delivery services, through BlackBerry Enterprise Server and Mobile Data Service, make them very inviting to developers to develop applications. Out of the box, you can deliver HTML content to them with very little work. Their Java-based operating system allows developers to create applications that deliver data in real time and can be interacted with using the device's intuitive user interface and full QWERTY keyboard.
I will concentrate on the most simplistic way to deliver content to the device by using a HTML browser channel. My next article may include a custom application for the handheld.
To use this code, you need:
- A BlackBerry Enterprise Server 4.0 or above
- A BlackBerry handheld running the 4.0 operating system or above
- The IPPP service book installed (automatically installed through Enterprise Activation)
- IIS 5 or above to run the WebService I have created
How It Works
The Mobile Data Service is completely HTTP based. You establish an HTTP connection to your BlackBerry Enterprise Server (default port is 8300) with some query parameters and POST containing your data. The handheld's browser listens on port 7874 for incoming pushes. Custom Blackberry HTTP headers specify information about the content and how to display it (including read and unread icons, title, and so forth). For simplicity's sake, I will let the handheld use its default icons.
Using the Code
I decided to implement this as a Web Service to allow easy access from other internal applications. The code is pretty straightforward. There is one Web Service method and one protected method that handles actually creating the HTTP request and firing it off to the MDS server. Configuration information about the MDS server is held in web.config and can be accessed using the built-in ConfigurationSettings.AppSettings collection.
The Web Service method has the following signature:
public virtual void PushToBrowser(string[] recipients,
string channelTitle,
string channelName,
string baseLocation,
string message)
To use it, create a new application and add a Web reference to it (I called mine BesUtils). The code below illustrates how you'd push a simple HTML document to a handheld:
BesUtils.MdsPusher pusher = new BesUtils.MdsPusher();
string[] recip = {"steven@mbccs.com"};
try
{
pusher.PushToBrowser(recip, "Hello World",
Guid.NewGuid().ToString(),
"", "<html><head>
</head><body>Hello World.</body></html>");
}
catch(Exception ex)
{
Console.Write(ex.ToString());
}
The image at the top of this article illustrates the icon and text that appears when a new message has been pushed to the handheld. You would click the icon to open the browser and it would take you directly to the document you pushed down.
Points of Interest
You need to keep channelName constant if you want the handheld to update the same channel. Otherwise, a new channel will be created each time you push to the handheld.

Comments
Short piece of writing discloses the indisputable details on gucci and precisely how it can have a bearing on anybody.
Posted by incockDak on 04/25/2013 11:11pmAll new queries about nike addressed and as a consequence the reason why you should definitely scan through each and every message on this article. [url=http://www.mizunogoruhujp.com/]mizuno[/url] Precisely why every thing you learned about nike is completely wrong and what you want to learn.[url=http://www.mizunogoruhujp.com/ããºã-ã´ã«ãã¯ã©ã-c-1.html]ããºã ã¢ã¤ã¢ã³[/url] Different queries about nike clarified in addition to the reasons why you has got to analyze each and every phrase in this expose. [url=http://www.mizunogoruhujp.com/ã´ã«ãã°ãã¼ã-c-33.html]ã°ãã¼ã ããºã[/url] Find who is posting about nike and reasons why you should get worried. [url=http://www.mizunogoruhujp.com/ã´ã«ãããã°-c-7.html]ããºã[/url] Supplies and production in New york : nike has left without any hasta la vista [url=http://www.mizunogoruhu.com/]ããºã ã°ãã¼ã[/url] The Primary Procedures To Develop nike Plus The Way One Can Become a member of The nike Top dogs [url=http://www.mizunogoruhu.com/ããºãmizuno-ã¯ã©ã-c-4.html]ããºã ã°ã©ã[/url] What scientists normally are not discussing over nike and also how it has an effect on you actually. [url=http://www.mizunogoruhu.com/ããºãmizuno-ã¢ã¤ã¢ã³-c-3.html]ããºã[/url] Basic fundamentals of the mizuno which you could profit by starting today. [url=http://www.mizunogoruhu.com/ããºãmizuno-ã¢ã¤ã¢ã³-c-3.html]ããºã ã¢ã¤ã¢ã³[/url] The Secret master the mizuno-world Is Fairly Straight forward! [url=http://www.mizunogoruhu.com/ããºãmizuno-ããã°-c-5.html]ããºã[/url] Whatever the scientists might not be claiming in regards to nike and ways this is relevant to you actually.
ReplyStrange editorial delivers the main points around nike which experts claim just one or two customers are conscious of.
Posted by icoppyapedcap on 04/25/2013 12:13pmZgyHyyWqkZrn [url=http://www.nikeyasuijp.com/]nike[/url]OqlCiqGumUdr [url=http://www.nikeyasuijp.com/nike-air-force1ã¨ã¢ãã©ã¼ã¹1-c-14.html]ãã¤ã ããª[/url]NngTzaVatUal [url=http://www.nikeyasuijp.com/nike-air-maxã¨ã¢ããã¯ã¹-c-12.html]nike air max[/url]LdhDxbCjoDnt [url=http://www.nikeyasuijp.com/nike-air-jordanã¨ã¢-ã¸ã§ã¼ãã³-c-13.html]nike free[/url]HezCgfUndYqx
ReplyIcon removal
Posted by gardavis on 02/21/2006 04:56pmAfter figuring out my company's server domain, the default ports worked and I received the HTML. What about that icon? How do I remove it? Thanks for the useful app. Gary
-
ReplyRemoval
Posted by sberkovitz on 02/21/2006 05:02pmGo to your browser bookmarks, there is a new folder named "Browser Channels". you can delete it from here.
Reply