Bidimensional codes
Posted on May 27, 2008 - Filed Under cell |
This last month I’ve been developing a visual tags reader for cell phones using Java mobile and the core library of the ZXing project. The software reads a special formatted and encrypted 2d code and shows related information stored in an XML database. The user can then edit some of the fields.

This is a QR code
Once I understand the limitations of the Java mobile platform, developing the application was pretty easy and interesting. These are the main topics I learned while working on this project:
- Bidimensional codes are really interesting, especially when the tags have also visual information. For an example, look this website with pictures inside the QR tag.
- An emulator allow easier and faster development of applications but you need to test the prototype in the real hardware as soon as possible. The reason is that you really want to verify that the application runs at correct speed and that you are not using too much memory. In the case of Java mobile, you can download the Sun wireless toolkit which comes with a handy emulator, but in my experience this emulator is not the best.
Sony Ericsson Wireless toolkit comes with a emulator closer to the real behaviour of the real devices. Problem is that Sony Ericsson WTK is only available on Windows platforms, and although there are ways to install and run the emulator under Linux, at the end I decided to install a Windows Virtual Machine only for testing with the SE emulator.
- Java is very complete but Java mobile is not. Java core libraries come with all the basic functionality you need to forget about most of the boring subroutines of the the underlaying layers and focus on the logic and the user interface of your application. On the other hand, Java mobile libraries are a subset of the regular Java libraries and it’s common to need common functions that are in Java but not in Java mobile. That means that you need to design your own workarounds or rely on the phone manufacturer’s special libraries condemning your app to run only in selected devices (Something that can be fine in case of developing special designed business applications because it can save lot of time)
- There is not any XML engine on Java mobile, and I couldn’t find any LGPL/BSD SQL compliant database. Does anyone know any engine I could have used?
- The signing of the Java mobile applications. I understand the reason Sun decided to force the applications to be signed with certificates issued by big authorities but I think it was an error not to define clearly the set of certificates all the phones needed to have. Sun should have defined a standard procedure to overcome the signing problem.
Anyway, the non-signed applications are too restricted, and maybe is the reason we only use our cells for gaming instead of business applications. I think it was an error not to automatically allow the Java applications basic functionality like access to the local filesystem, access to the PIM database or taking pictures. I think that only real critical functionality like connection to the network should be confirmed by the user, who either way is annoyed by constant confirmations. After all, you can have malware in your cell that is stealing data, but if it can’t connect to the network the data is not going anywhere. It’s only a matter of educate the user.
This is something that Sony Ericsson has resolved giving the user the opportunity of relaxing a lot the security rules for each ones of the applications installed. It’s not as good as sign your application but at least you can run business applications of the cell phone.
- Mobile computing is really exciting. Cell phone applications are not only games anymore. Java business applications and web based applications on normal cellphones are interesting and easy to develop. Google had foreseen very well this market, developing Android (An operative system for smartphones and a complete Java library, SDK and open license). Mobile applications will be an important market by the time the first Android based phones appear in the market later this year. Android based devices will be the firsts serious competitors to the already established blackberries and smartphones and they will probably eclipse all of them and will start fighting hand by hand with the Iphone.
I really want to continue developing mobile appications, and in the following weeks I will start playing with the Android library. Stay in touch!