Late 2008 I created my first Android application (fIRC) after obtaining the T-Mobile G1. The project was an early attempt to master the Java programming language and also a way for me to learn more about the Android mobile platform.
Since the Android Market was still young in 2008, my chat application fIRC became a success. While internet group chat isn’t something new, chatting on your smartphone in real time to other people was. People loved using fIRC because it was easy to join the chatroom for some small talk (By default fIRC connects the chatroom #android-chat on Freenode).
The reviews back in 2009 were pretty favorable, but went downhill after new Android devices were released onto the market. One of the (beginners) mistakes I made when creating fIRC, was that I designed the app specifically for one device, the device I owned: The T-Mobile G1. This means that it was created for devices that had a hardware keyboard, a 480×320 resolution display that was used in landscape mode.
On new devices (let’s say Android 2.x or newer) fIRC didn’t behave that well. UI elements weren’t aligned properly and the bundled resources were only meant to be used on low or medium DPI displays, so on those new devices fIRC looked quite horrible.
As the old chat code turned into a code spaghetti while trying to fix the problems, I decided to rewrite the app from scratch. I did most of the core last summer and some of the UI during fall. The newly rewritten UI of fIRC now scales properly on any phone or tablet device.
The main new features:
(1) Profile wizard
IRC is not that common these days, one of the complaints of the previous version was that nobody knew how to connect to a different server and how to enter multiple chat rooms (or actually so called “channels”). In order to address this problem, I’ve made a profile wizard, that helps you out by providing some quick settings and a list of commonly used IRC servers (such as DALnet, EFnet and Freenode).
More advanced users requested muti-server supprot because they often like to join multiple irc servers. This new version allows you to do that. Simply create one profile per server, hit the menu button and choose “Connect all profiles” to connect.
(3) Fast channel switching
No need to dive into the menu anymore to switch channels, just use a swipe motion (left/right) to switch between chat rooms.
(4) Fully customizable chat
fIRC now allows you to customize the incoming messages and color them in the way you want. You decide which font, font size, background color and text color you want to user per message type.
(5) File transfer support
A unique feature on Android IRC apps: fIRC supports DCC file transfers (3G and WiFi). Currently only DCC receive is implemented.
(6) Store chat logs
fIRC allows you to store your chat logs on your SD card for future reading.
Porting to the BlackBerry Playbook
I wasn’t aware that the BlackBerry Playbook had some kind of emulation layer to run Android apps, so after watching the video below, I decided to give it a shot. I mean, how hard could it possibly be?
Basically you will have to sign up as a vendor on this site: https://appworld.blackberry.com/isvportal/ . RIM will sent you an e-mail (took about a day here) with the request to provide some documents proving you are a company. Fortunately I still had a copy from the Chamber of Commerce that I could use.
While waiting for RIM to approve your account, you should request a code signing key. You will need this key to sign your app later on. After you’re done with that, open up Eclipse and install BlackBerry Plug-in for Android Development Tools.
Since fIRC doesn’t use any of the advanced features of the Android SDK or Android NDK (not supported), the only things I had to do were:
- Convert the Android project by adding a “blackberry nature”
- Remove the Android references in the app (CTRL-F “Android”)
- Resized the application icon to 86×86 pixels
- Test the app in the simulator
From the list above, I’d say that testing the app on the simulator was the most time consuming. Blackberry provides a “BlackBerry Tablet Simulator”, but it is actually a virtual drive image with the Playbook software pre-loaded that you can run in VMWare Player.
If you thought the Android emulator was already slow compared to the iOS simulator, think again. Booting up the Playbook takes quite a bit (it feels like booting a desktop OS), and the interaction with the mouse feels a bit sluggish. After the Tablet OS is fully booted, its time to put it in development mode. This allows you to connect to the simulator from Eclipse. Recompiling the Android project and installing it into the simulator feels almost the same as using the Android emulator. Just hit the play button.
Unfortunately the Playbook simulator isn’t all that great for testing your converted BlackBerry apps. In my case the screen flickering was really bad and fonts were blurred (Native BB apps were alright though). Reading the BlackBerry Dev forums, it seem to be an issue with the simulator, so hopefully it looks good on the real device.
The only real trouble I had was signing the app itself to prepare it for the BlackBerry App World. I was following the steps from the Youtube video above. However, BB changed the names of the dropdown menus in Eclipse. Fortunately the documents describe how to do this properly: Sign your app.
For me porting fIRC to the BlackBerry platform seemed to be a quite painless experience. However, I would advice you to test apps thoroughly on the Android Emulator and when you’re ready for release, test it out on a real Playbook instead of the simulator. That would probably give you a much smoother workflow.
For me that will hopefully soon be possible. Last week I received an e-mail from RIM that my application was accepted to the BlackBerry App World and that I would receive a free Playbook soon :).