JaGD - Mobile Photo Treasure Hunt for J2ME phones
JaGD is a photo oriented learning and gaming platform for mobile phones. You can find more information on a poster which was presented at Ubicomp 2005 (paper, poster). The JaGD system is implemented as a client server system. It includes
a backend system and clients that run on mobile phones.
The backend is implemented in Java (Servlets) on a Tomcat server. It
includes a game editor, a viewer, user management, and voting. The games
created with the editor are available for download over HTTP. The upload
of pictures to the server can be done over HTTP as well.
For the mobile phone a standalone application is implemented as a MIDlet.
The MIDlet is the platform that downloads a game description over HTTP
and runs then the game. During the game the user can be off-line. After
finishing all tasks the locally stored pictures are uploaded to the sever
by the MIDlet. The application on the client side uses the J2ME API and
currently works on the Nokia 6600 (Java 2 Micro Edition, MIDP 2.0, CLDC 1.0).
Game instructions are provided as XML documents by the server and therefore
have to be parsed on the mobile client. We used kXML as a small pull parser
that is designed for use in MIDP environments. The parsed values, user data
and photos are saved in record stores. The built-in camera of the mobile
phone is controlled using the Mobile Media API (JSR 135). To provide an
individual look-and-feel, the UI is composed of customized items.
Server
In the game creation process the author gives the game a title and
provides a short description of its purpose. It can be defined if the
tasks have to be performed in the order set by the author or if users
can do it in an order they want. Then the tasks are described, each with
a short explanation. For each task the author can specify the number of
pictures that can be taken and how many points one gets for this task.
Overview for a Munich city game:
Requirements
- Installed Tomcat or any other servlet server
- Installed MYSQL database
For your first test you can use our database.
IP: 141.84.8.96
Port: 33006
DBname: pmeg2
DBuser: pmeg2
Password: j.2.m.e.
MYSQL package mysql-connector-java-3.0.16 or higher (you can find it in the director /mysqldriver/)
needs to be installed on your server
- The code is provided as an Netbeans 4.1 project (you should install
Netbeans 4.1. and the Netbeans Mobility Pack).
Install files
There are two possibilities:
- Install jagd.war via your Tomat Manager (or any equivalent)
- Copy all files from the jagd folder to the Folder you want it to be on your Tomcat server
You can start the Netbeans Project within Nebeans (Netbeans already inlcudes a Tomcat server)
Install database
Run the install routine of JaGD:
- go to your install directory and call the Install Servlet
(e.g. http://www.yourhost.com/jagd/Install) -- no .html and capital "I"
Here you can use the database facts mentioned before.
- Follow the instructions on the screen.
!! ATTENTION !! : for securty reasons you can't use the installation routine
again, once you successfuly finished it.
Now you can call http://www.yourhost.com/jagd/Login to start using JaGD.
Source code
For the website (server) there are different folders. Here is the explanation.
- jagd/css/: contains the css file for the web page
- jagd/images/: the images for the web page
- jagd/META-INF/: meta information for the tomcat server. Actually it only contains the name of the servlet
which is also used as the root element.
- jagd/uploads/: contains the images, uploaded by the users
- jagd/WEB-INF/ Is the default folder for Tomcat projects. Everything inside this folder can'T be directly opened by a visitor of the web page.
- classes: contains the classes. e.g. the servlet classes.
- dbsdata: contains the xml file that stores the conenctio data for the mysql server.
- doc and lib: empty
- templates: contains the html template files
You can download the source code or the compiled .war file.
Client
When playing the game the tasks created with the editor are displayed
on the phone. In case the game author decides that they need to be
completed in order the user only can select the next task otherwise the
user can freely choose which task to do.
Mobile phone screens for a single task:
When all tasks are completed or the time is up the user can upload
the pictures. On the server the pictures are presented for other
participants in the game to look and vote.
Used Software
The client code is delivered in form of a Eclipse project. For the opening
the project and starting the application in an emulator you have to install the folowing software:
Used Hardware
Nokia 6600 and 6630, Siemens S65.
Phones have to support at least:
- J2ME
- MIDP 2.0
- CLDC 1.0
- Mobile Media API (JSR-135)
Application
The source code is structured in the following packages:
- connection: contains the classes that do the upload over HTTP and the base 64 encoding
- controller: contains interfaces and classes that implement the game logics
- model: contains classes that represent the parts of a game (game, task, picture, user)
- view: contains all classes that implement the ui (forms, custom items, canvases, action handler)
(Quite large as several methods did not work properly on the Nokia 6600 and a lot of workaround is
done in here.)
Download source code and import it to an Eclipse project called "mobileApp".
Using Netbeans you can import the four packages and add kXML-min.jar to the build path.
The compiled jar file is ready to be installed on the phone.
If you have any comments or questions, please feel free to ask us!
|