Archive for August 19th, 2011

An HttpRequest and HttpResponse library for BB OS5+

A simple thing that is seen all over stack overflow with constant questions is how to do an http request. I’ll admit this library probably is not perfect, but it is quite in depth and you should be able to find anything you need inside of it. If you want to use it with the classes included in this post and this post download the extra package. If you do not, you’ll need to remove the references to the Logger class from the HttpRequest library.

HttpRequest – HttpRequest BlackBerry library

Javadoc – Javadoc for the library

Extra – extra package for Logger and ObservedThread HttpRequest implementation

 

Below is the usage for downloading a simple image file:

1
2
3
4
5
6
EncodedImage image;
HttpRequest request = new HttpRequest(_imageUrl);
HttpResponse response = request.getResponse();
if (response.getMimeType().equalsIgnoreCase("image/jpeg")){
	image = EncodedImage.createEncodedImage(response.getResponseBytes(), 0, -1);
}

Note that this class will only attempt connections that are available and have enough signal strength. You can use the “Transport” class to check different transports or get a list of available (service book exists and signal strength is high enough, i.e.  getFunctionalTransports() ) connections.  For example “Transport.isWifiSupported()” obviously tells you whether wifi is supported.

 

Brand new BlackBerry Torch 9800 Buggy

So you just bought a brand new BlackBerry Torch and it is doing things like having trouble opening the browser, web pages are strangely mirrored and random 10 seconds of non-responsiveness. My Torch was purchased at release, and worked really well, until an upgrade came out for it. I eventually got so frustrated I downgraded the OS back to the original release OS.

To see if you are in this position:

1) Go to Homescreen. While holding alt type “e s c r”.

2) if your AppVersion is 6.0.0.246 (695) , Stop reading this page, its useless to you.

3) If it is: 6.0.0.448, And you are frustrated, you may want to try downgrading or upgrading. Since I know the downgrade software is pretty stable (I use it), I suggest downgrading. If you want to take a chance that the upgrade is even better, try it out. It is the Rogers download at Applications version 6.0.0.600

Of course, you’ll need an installation of Desktop Manager

To downgrade, go to this website and select your carrier. I am familiar with Telus and Rogers and thus will explain from that point of view.

You have two options at this point, you can go to the Rogers page and upgrade to 6.0.0.600 or select either Rogers or Telus and download the 6.0.0.246 bundle. It should not matter that you select software from a different carrier for the most part. The biggest difference is that different carriers will request some features be not included or additional features included in their bundles. Otherwise they are exactly the same.

After downloading this, install it, and restart your computer. Open desktop manager with your BlackBerry plugged into your computer, and the “Device” menu in the top left. Click “Update My Device” and when a popup explains that you have “No BlackBerry Device Software updates available”  click on the “View other Versions” button in the bottom left of the popup.

In the list should be the version we want, and follow the instructions from this point, making sure that if something asks you whether you want to backup, select yes. Often times I will back up my device myself before doing any OS changes. This is of course in the “Device” dropdown menu, selecting “Back up”.

 

For pretty pictures of the process go here

 

Return top

INFORMATION

I do not adhere to a schedule. I post when I have something to say. I'm a programmer who in my spare time enjoys contemplating the meaning of life, the universe and, everything. So there will be code as well as random little stories, essays and, musing about whatever interests me at the moment.