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
javax/microedition/location/Coordinates
I have an OK command which executes above method and appends returned string to the form. Any help would be highly appreciated.Code:public String checkLocation() { criteria = new Criteria(); criteria.setHorizontalAccuracy(500); String string; try { locationProvider = LocationProvider.getInstance(criteria); location = locationProvider.getLocation(60); } catch (Exception e) { //TODO: Handle exception. return "failed"; } coordinates = location.getQualifiedCoordinates(); if (coordinates != null) { // Use coordinate information double lat = coordinates.getLatitude(); double lon = coordinates.getLongitude(); string = "\nLatitude : " + lat + "\nLongitude : " + lon; return string; } else { string = "failed"; return string; } }
Regards,
Yasir

Reply With Quote

