J2ME Applications

1. Overview

A. Pizza Express - The Complete Pizza Ordering Package for Mobile Devices

There are a number of situations in which the need to place an online order for things becomes important. Placing quick pizza orders has now become the trend with a lot many people asking for the service by simply making a call. However this ordering is not really interactive when it comes to ordering pizza through a mobile phone and the user either has to know the pizza he wants or must have a flyer of the Pizza store. Hence the need for Pizza Express was felt - a complete package to be installed both at the client and the server side so that the client simply can make his selection of pizzas and place a quick order using his mobile device.

screenshots-pizza.png

The figure shown simulates how a typical pizza express software would look. Here the user first is given the choice of selecting his choice of pizzas e.g. Cheeze, Mushroom etc and is then taken to the Size selection screen where he can select the size of the pizza as either small, medium, large or extra large. Once these details have been filled up the user is taken to the payment screen and then finally to the confirmation screen after which his request is registered with the Pizza Store. Now at the backend a servlet known as Dummy runs which basically makes database entry of all successful requests of pizza orders which can be printed out by the pizza company and the delivery can be made.This was a simple project implemented by me by using the Java Wireless Toolkit but it has real-world applications and if further extended and marketed properly this software can work as a real commercial product. The client code was written as a midlet in J2ME while the server code was written as a servlet. Servlets are the increasing standard today for keeping the client then and the server thick. So all the code at the server side which does backend processing can be as huge as possible and embedded in a single servlet file. This servlet is assigned with the responsibility of listening to incoming client requests and when the call is made, it does two things. It automatically makes corresponding database entries such as pizza orders with their type, size and cost. Secondly it does processing and presents results to the client on his mobile device. Thus a very acceptable solution to processing client requests is obtained. Now this application can further be modified to various other contexts such as the ticket booking service

B. JMall - A Ticket Ordering System for Mobile Devices

Like Pizza Express, JMall is also an ordering package built with the J2ME Wireless Toolkit but here the context is different. In this case, a ticket ordering system is implemented. The user is given a nice interface to select his theatre, screens and show timings which are sent to the theater ordering processing backend where something like a servlet again can be used to process incoming client requests. Once the request is complete appropriate entry is made into the database at the theatre and the output is sent back to the client on his mobile device. Thus a very handy software solution for mobile movie goers is provided through JMall.

screenshots-jmall.png

The figure shows the JMall software in two different screens. First the user is given the option of selecting his preferred movie theatre and on the next screen an option to select desired screen is provided. Once these steps are completed by the client, he finalizes his order and sends it to the movie theatre. The servlet at the backend in the movie theatre listens to incoming client requests. When a request is received, corresponding database entry is made and the servlet then processes needed information and sends back output result to the mobile device user. This application can provide tremendous ease of use to mobile users who prefer to purchase movie tickets on the go and it can also extend the reach of a particluar theatre from phone-based ordering clients to real time mobile users, the population of which is growing extremely strong day by day. Once the system is installed both at the client and the server side, it can benefit for the parties. The client side code is written in Java in the form of a midlet while the server side code is essentially a servlet which will process all the information and make corresponding database entries. The user interface however over here is a bit restricted in terms of navigation and the user is given limited buttons and means to enter his choices. This interface is designed specifically keeping the convenience of a mobile user in mind and the the user is given only a set of input keys which he can use to make his choices. Select and Quit options are provided at the end of each screen so that the user can either move on to the next screen or he can quit anytime. This software though simple provides tremendous scope for actual commercialization of the product and can be of great help to those who want to mobile-ticket.

C. Bouncing Ball - A Bubbly Screensaver for Mobile Devices

Bouncing Ball is a nice little screensaver for mobile users who can enjoy different shapes of balls bouncing from left to right on their mobile screens. Three different balls first start from the top then go from side to side along the user's screen and finally reach the bottom. After reaching the bottom their journey continues to the top in the same way. However there is a lot of randomness involved as the next position of each of the balls is decided by adding or subtracting a randomly generated number to the previous position of the ball.

screenshots-bb.png

Thus the Bouncing Ball Screensaver can be easily downloaded by the user on his mobile device and can be enjoyed. To actually code the screensaver a set of concepts and procedures are followed. The program is essentially a midlet which has java code written in it. We heavily use the graphics package provided as part of the java language to draw to the screen. The Ball Canvas is set and initialized first. Then the starting position of each of the three balls is decided and a random number is generated on each increment of the ball's position which is added or subtracted from it. Because of this the ball moves from side to side i.e. from left to right while moving from top to bottom and from right to left while moving from bottom to top. The user interface is kept clean and simple in the form of pressing any key to come out of the screensaver just as you press any button on a normal pc to come out of the screensaver. The screensaver is also automatically started if the user does not press anything for a long time or his mobile device has been busy for a long time. The screensaver though not very graphically matured is still very pleasing to look at and you can try the same by downloading the source code provided here. All you have to do is put the compiled java file in the wtk folder and allow the wtk environment to detect the program. Once this is done the emulator will show the kind of screens as shown on the left. The screensaver can also be provided to users on request or they can download it themselves from the service provider. The screensaver. The Bouncing Ball class basically extends the midlet and the Ball Canvas class extends the Canvas class as provided by the j2me specification. I am also planning to develop other such entertainment media for mobile devices.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License