Category Archives: Mobile

Blackberry Swallowed My Error

In some peculiar cases there will be an error thrown somewhere in the Blackberry modules that were invoked from your coed, but the error will never return to you, even with a try-catch block set. The stack trace of the error will be printed to the console, your process will be terminated and an error message will pop up on the device/simulator screen with: Uncaught exception: and the exception name.

An example for this is the Controlled Access Exception. When trying to open a file that is access controlled, even a specific catch for this error it will not matter, the process will be killed and the error window for uncaught exception will pop up. The best practice is of course to check for access control before reaching for the file, but it still doesn’t make sense to have it swallow the error and kill the process instead of bubbling it up. Also, for the access control it’s pretty straight forward, but now I have encountered it again, with a java.lang.Error exception and the process gets killed… java.lang.Error is slightly less informative than ControlledAccess Continue reading Blackberry Swallowed My Error

Deploying a BlackBerry Application OTA in IIS

You can get an application to your BlackBerry in four different ways.

  1. (OTA -Over The Air) Host the application files on a web server and browse to them from the phone
  2. put the application files onto a SD card and load it on the device
  3. load the application onto the phone using the BlackBerry Desktop Manager
  4. push the application to the phone using the BES

There are three different types of files that you will use to install the application on your phone.

Manifest files.

You will need one or the other depending on the deployment metheod you are going with. These files hold the information on how to install the application on your phone what files are going to be needed to do that. Continue reading Deploying a BlackBerry Application OTA in IIS

MBTA Bus Locator

I wrote an app for my G1 to get information from the real-time MBTA bus location feed and display it in Google Maps as bus icons. It was an interesting experience to develop for.

The Android eclipse environment has its fair share of hiccups unfortunately, simple things like how a down arrow usually behaves, or not being able to scroll all the way to the bottom of a list using your mouse scrollwheel. The emulator and eclipse’s debugging capabilities were really helpful, and robust for the most part. The most difficult thing in developing for it was figuring out how to do what I wanted to do, what functions and classes to use. I guess that’s inherent in developing for a new platform.

The app is pretty simple. It’s one screen, with most of it taken up by Google Maps and a bar at the top containing space for a refresh button and a status update box. It defaults to Watertown square when it starts, although that could easily be changed to use GPS or something else. When the app starts and when the refresh button is pushed, it retrieves a list of bus locations from the feed XML. Those locations are sorted by distance to get the 20 closest buses to where the center of the map is. (The distance is currently computed by sqrt(latitude^2 + longitude^2). This is slightly incorrect since a difference in latitude may be smaller or larger than a difference in longitude. I’ll fix that soon using this. Overlays are then created using a bus picture I got from Wikipedia and inserted into Google Maps. Continue reading MBTA Bus Locator

How to Enable Debug Logs on Your Blackberry

Enabling debug logs on a blackberry device can help provide useful information when troubleshooting an issue.

Blackberry Storm

  1. Bring up the keyboard on your home screen by pressing the blackberry key followed by show keyboard.
  2. Hold the 123 button in until you see a small lock icon.
  3. Type in the following sequence “/”/

Other Blackberries (This hasn’t been tested on anything newer then the Curve.)

  1. On the home screen, hold down the ALT key and type the following sequence LGLG

Log display

  1. You can adjust the minimum log level under EventLogger Options by pressing the blackberry key followed by options. You can changing the level in the top drop down box.
  2. While still under EventLogger options, you can filter certain logged events by toggling them on and off.

How to save a copy of the debug log

With the EventLog screen open:

  1. Click the track wheel and select Copy Day’s Contents.
  2. Paste the contents into the body of an email and send the message to yourself.

How to Disable MDS-CS on a Per-User Basis

Any BES administrator who has migrated their BES environment from 4.1 to 5.0 can see the extensive changes made in the central blackberry management interface. I’ve found it difficult at times to find certain options in the new BAS console. Today, I was looking for the option to turn off MDS-CS for a specific user in other words I wanted to keep the user from browsing the internet/intranet from their blackberry. The MDS user component has been renamed External Services and can be found under the component information of a BES user account.

BlackBerry Simulator – *.debug File Not Found

I encountered an interesting (and frustrating issue) with the BlackBerry simulator in Eclipse. I got an error upon starting the simulator that the *.debug file was not found with some options to search and browse for it. Looking around my system showed that indeed – no *.debug files exist. I’ve tried many things, erasing all my Simulator Files, cleaning the build, re-building and so on, to nothing helped. Eventually I ran into this forum threadin the blackberry forums discussing this specific problem. It turns out that sometime, even though there are errors in the build – no errors will be shown, making you believe the build was successful. However, this is not the case. There should be an *.err file (were the *.debug file should have been) describing a compilation error in code.

Seeing that this came from the same error mentioned in the thread – _X is not Persistable: base Class does not implement net.rim.vm.Persistable_ , it might be that this specific error has a problem displaying in Eclipse.