Its really great to see another example of Location based Application.This articles has given code on how to use Location API to Make application like Real Compass.Using J2ME classes one can draw compass on screen.
Example has also given code to get latitude,longitude,Speed and course of the device user on the way using inbuilt Device GPS Capability.As J2ME Developer i have tested the give code.
Code is really easy to understand and code explanation is also given in beginning.And The Running application snapshot illustrated for the purpose of readers convenience to see before they try.
--Kalki 18:56, 14 September 2009 (UTC)
Review:
This article describes how to use the Location API to retrieve latitude, longitude, course and speed information. For this reason, perhaps a more appropriate title would be “How to get location information in Java ME”. The article provides sample code, showing how to retrieve the above information using the LocationProvider class which is part of the Location API. The example also shows how to display this information using a simple compass interface.
One thing which could be criticized about the code example provided is that it does not make use of the LocationListener interface for updating the user’s current location. Instead, a thread is created which loops continuously to achieve the same thing. When setting the LocationListener for a LocationProvider instance, the programmer is able to specify an update interval. Therefore what the code example in this article does using a separate thread can actually be achieved using the classes and interfaces provided by the Location API.
An important thing to note about the code example provided is the need to call the setCourseandSpeedRequired method of the Criteria object which is passed along with the request for a LocationProvider instance if course and speed information is required. This is a fairly common error for beginners to make.
--Larry101 09:19, 25 September 2009 (UTC)