So the blackberry documentation shows you the following code example:
import net.rim.device.api.lbs.*;
import javax.microedition.location.*;
public class myReverseGeocode
{
private Thread reverseGeocode;
public myReverseGeocode()
{
reverseGeocode = new Thread(thread);
reverseGeocode.setPriority(Thread.MIN_PRIORITY);
reverseGeocode.start();
}
Runnable thread = new Runnable()
{
public void run()
{
AddressInfo addrInfo = null;
int latitude = (int)(45.423488 * 100000);
int longitude = (int)(-80.32480 * 100000);
try
{
Landmark[] results = Locator.reverseGeocode
(latitude, longitude, Locator.ADDRESS );
if ( results != null && results.length > 0 )
addrInfo = results[0].getAddressInfo();
}
catch ( LocatorException lex )
{
}
}
};
}
How do I use the above mentioned code to pass in dynamic longitude/latitude values in my main application?