Tutorial on developing location based services (LBS) using J2ME (java microedition) suitable for portable mobile devices, includes JSR 179 API used in j2me for LBS applications and general user interface (UI) development in j2me. It gets started with general programming structure of j2me codes, develops the foundation for user-interface design in java micro edition and proceeds to describe features in JSR-179, a particular API which is designed to aid LBS programming in java. Examples are provided throughout the tutorial to illustrate the coding techniques.
Location Based Services or LBS has attained a special interest in recent years. Although having an obvious need, LBS was limited by technical inefficiencies. With increasing memory, speed and data transfer rates over networks, now it is all set to grab your life sooner or later.
Java, the platform-independent ubiquitous medium of rendering computer applications, is a natural choice for developing LBS, as they are likely to run on a wide variety of devices. Before we start with the tutorials, letâ€™s find out why we should bother about LBS and J2ME and more importantly what you get to know from this site.
LBS or Location Based Service applications provide services based on subscriberâ€™s current geographical location. Say you are in a new place and you want to find a restaurant. Just avail the LBS, it will show you the restaurants within a range, give each oneâ€™s distance from your current position, show them on a map or even guide you to your chosen restaurant through the shortest route. The list can go far beyond such location finder applications and is limited only by your imagination.
LBS gives you information relevant to your current location. It can be anywhere on the globe. And more often than not, you wonâ€™t be carrying a PC or even a laptop with you. Thatâ€™s where J2ME comes in.
J2ME is the Micro Edition of Java. It contains a set of APIs optimized for developing applications on resource-limited devices such as cell phones, PDAs or other stand-alone devices. We would like to develop our location based services applications on j2me so that he/she can use it comfortably on a portable device he/she already owns or can buy easily.
This site gets you started with J2ME, the basic structure of programs and the LCD user interface. It then shows you how to use JSR 179, the java location API used for developing LBS applications on J2ME. It also talks about handling images in J2ME, as you will have to use maps for many of the applications. The server side programming is also discussed, as all data canâ€™t be stored or updated on the memory-limited devices making a server connection important for LBS applications,
You should know general Java coding knowledge to get started. Having knowledge of J2ME coding is welcome but not required.
You will need J2ME wireless toolkit installed with a recent java SDK (version 1.4.2 or later). You also need a SDK, which supports the location API. I will use Nokia prototype SDK 4.0. A GPS-enabled device (I use Nokia 6165) will be nice to test your applications but is not a must for development. How to download and install the toolkit and SDKs is given in the appendices.