BES, BIS and Direct TCP

by Sergio Flores 3. March 2010 00:36

New Blackberry programmers are often faced with the following scenario: They just finished their first web service enabled app, which connects to a site to retrieve some data, thoroughly tested it on the simulator, but after installing it to a physical device and attempting to connect...OUCH! No connection, NADA! What can be wrong?

Well, to answer that, first we have to look into the 3 methods Blackberries use to connect to the Internet:

  1. BES. Short for "Blackberry Enterprise Server" this is a software that you can buy and install on a server under your control, and then assign devices to it. It acts as a middleman between Internet sites and Blackberries in your organization. It has other features as well, but due to its not exacly cheap pricing, only large organization with a clear need for it buy it.
  2. BIS. The original Blackberry Internet Service, it already existed before modern cellphones from other manufacturers were able to connect to the Internet generally. This connection is used by pre-installed applications, such as Blackberry Messenger and Facebook. It works quite well, but unfortunately for us mortal developers, it´s only available to "Alliance Partners" and not for general 3rd party apps.
  3. Direct TCP. This is the connection now used by every other cellphone in the world. Blackberry apps have to specifically request it.

Because of the above situation, we always use Direct TCP for our applications, although there is a caveat; end users should have an "Unlimited" data plan as part of their service. In general, operators offer various plans for Blackberry users, and the cheapest ones do include unlimeted Internet use, but only for the pre-installed applications (typically Messenger and Mail), therefore, you should check the documentation of your operator to be sure. Otherwise, using Direct TCP will most likely result in data transport charges levied by the operator, which may be significant depending on the app.

Aside from the connection issue, it´s worth mentioning that BES offers some other interesting features, like remote erasing, software policies, shared contact addressbook, and push notifications. Plus there is an "Express" version available, with a much more affordable price, althouh limited to 20 users.

One final point you're probably already wondering, How do you specify on your code you want to use Direct TCP? Well, quite simply actually, you just add ";deviceside=true" to the URI, like so:

oConn = (HttpConnection) Connector.open("http://www.miservidor.com/miwebservice.asmx;deviceside=true", Connector.READ_WRITE, true);

Good luck!

Would you like to learn Blackberry Enterprise application development? Check out our online training events: www.IHGstudios.com

Tags: , , , , ,

Blackberry

About the author

Hi, my name is Sergio Flores and I´m the manager of IHG Studios, a software development and training firm established in Mexico City. Thanks for reading and I hope you find my blog useful.

Month List

Page List