JVM Languages
location.txt
Associated article: The Java Location API
Tags: Mobile JVM Languages
Published source code accompanying the article by David Parsons in which he examines the Java Location API and uses it for developing applications for mobile phones. Also see LOCATION.ZIP.
The Java Location API
by David Parsons
Listing One
(a)
try
{
locationProvider = LocationProvider.getInstance(null);
}
catch(LocationException e)
{
// handle exception
}
(b)
try
{
location = locationProvider.getLocation(20);
}
catch(LocationException e)
{
// handle exception
}
catch(InterruptedException e)
{
// handle exception
}
Listing Two
latitude = new StringItem(&...


