If you develop mobile applications on other platforms such as Java ME, iPhone, Winmos or others, making a HTTP/TCP/UDP connection to the Internet is straightforward. The underlying network used is either Wifi or Cellular (aka GPRS/3G).
But for BlackBerry, it is many times more complex.
The BlackBerry platform provides a multitude of different transports for network access – Wifi, MDS, BIS, WAP 1.X, WAP 2.0 or Direct TCP. Refer to the diagram below.
Unfortunately, the platform does not provide a simple API that use whichever network that is working. Developers have to add extra parameters to the URL that they want to connect to. That is tolerable, but the problem that comes with each network is not.
Lets look at each network and their problems.
- Most users have BIS (BlackBerry Internet Service plan). But for developers to use BIS, they have to join the Alliance program. At a fee of course.
- Enterprise users have BlackBerry MDS (Mobile Data Service plan), and it is up to the enterprise admin to regulate the traffic. If they block with firewall, you will hit the wall.
- If you use WAP 1.X or WAP 2.0, you are using the service provider network and it could be subjected to some ridiculous transcoding.
- If you want to use direct TCP, you have to either know the carrier’s APN or have a user that configure the APN under Settings > Advanced Settings > TCP. Very unlikely for either.
- Wifi is good, but not all phones come with it.</ul>
To conclude, RIM has got us a complex network problem to deal with.
Solution
A suggested solution is as such.
- Join the Alliance program and use BIS. Then for each application, apply for an application code to use the BIS transport.
- In your connection code, connect in the order Wifi > BIS > MDS > TCP > WAP</ul>
Versatilemonkey has a good Helper class that helps to encapsulate the extra parameters needed for the different connections. It is helpful code. There is also an interesting article from versatilemonkey on his BlackBerry development story. Worth reading.
References
- In your connection code, connect in the order Wifi > BIS > MDS > TCP > WAP</ul>
- Wifi is good, but not all phones come with it.</ul>
- If you want to use direct TCP, you have to either know the carrier’s APN or have a user that configure the APN under Settings > Advanced Settings > TCP. Very unlikely for either.
- If you use WAP 1.X or WAP 2.0, you are using the service provider network and it could be subjected to some ridiculous transcoding.
- Enterprise users have BlackBerry MDS (Mobile Data Service plan), and it is up to the enterprise admin to regulate the traffic. If they block with firewall, you will hit the wall.