Tyth over at crackberry.com forums says this bit of code should work.
Code:
LocationProvider provider;
try
{
provider = LocationProvider.getInstance(null);
int vendorId = Branding.getVendorId();
if (provider == null)
{
Dialog.alert("GPS unsupported on this device.");
System.exit(0);
}
else if (vendorId == 105 || vendorId == 226 || vendorId == 237)
{
try
{
GPSSettings.setPDEInfo("127.0.0.1;12569612;F5468C61EE541421908597C54975B584", 0);
}
catch (IllegalArgumentException iae)
{
// shouldn't happen
Dialog.alert("Failed in sending PDE credentials to carrier.");
System.exit(0);
}
catch (UnsupportedOperationException uoe)
{
// not a CDMA device
}
}
// set up the location listener here
provider.setLocationListener(<object implementing LocationListener>, 1, 1, 1);
}
catch (LocationException le)
{
Dialog.alert("Failed to instantiate the location provider.");
System.exit(0);
}