J2ME Client
The J2ME Client has been developed für mobile phones supporting J2ME and the MMAPI (Mobile Media API) extension.
Supported Phones
The provided clients have been tested on a Nokia N70 mobile phone and are also working on a Nokia N90 device.
We also tried them on a Nokia 6630 device, but discovered that the recognition on this device is very poor, due to the fact that the the Java implementation limited the resolution of the camera images to 160x120 pixels. (The images returned by the system have the dimension they should have, for example 640x480 pixels, but when one takes a closer look at the returned images, it turns out that they are extrapolated from the lower resolution...)
Since our primary focus was not on providing a ready product that runs on many phones, it is possible that the software is not working on some models. If it is not working properly, one very likely reason is the fact that your device doesn't support the format in which we try to get the image from the camera. The standard format used when pressing the OK button is specified in the genericClient.algorithm.Profile class. Currently we use the following encoding that works on the above Nokia phones:
private String image_encoding = "encoding=bmp&width=640&height=480"; |
Also have a look at Documentation/ProvidedClients in order to get some information about what is required to test the clients.
What do I need in order to develop J2ME applications?
See www.sun.com for information about the Java Micro Edition and instructions on how to set up a development environment for J2ME applications. Instead you can also have a look at the mobile phone specific development pages, e.g.Nokia
The development with Eclipse in combination with the EclipseME plugin worked quite well.
Provided Client(s)
There are three quite similar clients available that implement three prototypical applications.
| Book Information | Product Assistant | Product Origin | |
|---|---|---|---|
| Files | BookInformation.zip | ProductAssistant.zip | ProductOrigin.zip |
Only the connection.ServiceReply class that represents the information server's reply and the application.InformatioForm class that displays the information server's reply are slightly different.
Each zip-file contains the Java code, necessary resources (images) as well as a final JAR file that can be copied directly on the mobile phone, allowing for a quick test of the system.
Java Server
The Java based information server requires an implementation of the JSR-82 Bluetooth API in order to allow Bluetooth connections from the J2ME client. We used the open source implementation Bluecove. If no Bluetooth connections are required, the according code can be removed easily.
Removing Bluetooth Support
Remove the information_server.server.BluetoothServer class and comment the following line of code in the information_server.server.Information_Server_Main class.
InformationServer_Data.addServer(new BluetoothServer("InformationServer")); |
Starting the Server
When extracted, the files stored in the provided zip file will be extracted into a directory called batoo_server. The source file main folder is the information_server folder. It contains the application's main class information_server.Main. All other files are contained in subpackages.
There are two files provided that ease the quick compiling and starting of the server under a windows environment, without the need to set up a development environment.
In order to compile the code, go into the batoo_server directory and execute the compile.bat file, specifying the path to the javac.exe file as the first, and the path to the bluevoce.jar file as the second parameter. (Or just "." if the bluetooth support has been removed) E.g.
compile.bat c:\programs\Java\jdk1.5.0_05\bin\javac c:\bluecove-1.1.1-bin\bluecove.jar |
After compiling, the server can then be started using the start.bat file with the first parameter specifying the java.exe file and the second one again the path to the bluevoce.jar. E.g.
start.bat c:\programs\Java\jdk1.5.0_05\bin\java c:\bluecove-1.1.1-bin\bluecove.jar |
Have fun!