hello, I'm writing an app which has gps functionalities but the latter will fail on phones like 6280. My aim is to ignore the exception and continue with other methods from my application but this seems daunting. Phone returns:
No class def found Error java/lang/NoClassDefFoundError
I have an OK command which executes above method and appends returned string to the form. Any help would be highly appreciated.
public String checkLocation()
criteria = new Criteria();
locationProvider = LocationProvider.getInstance(criteria);
location = locationProvider.getLocation(60);
} catch (Exception e)
//TODO: Handle exception.
coordinates = location.getQualifiedCoordinates();
if (coordinates != null)
// Use coordinate information
double lat = coordinates.getLatitude();
double lon = coordinates.getLongitude();
string = "\nLatitude : " + lat + "\nLongitude : " + lon;
string = "failed";