On Thu, Jul 29, 2010 at 7:49 AM, Prasanna Perera <[email protected]>wrote:
> How do I prevent the IOException from happening? > Step 1: Read the documentation to determine when this exception gets thrown: http://developer.android.com/reference/android/location/Geocoder.html#getFromLocationName(java.lang.String, int) <http://developer.android.com/reference/android/location/Geocoder.html#getFromLocationName(java.lang.String, int)> Throws IOException<http://developer.android.com/reference/java/io/IOException.html>if the network is unavailable or any other I/O problem occurs Step 2: Realize that you have no control over the network (which is probably what's going wrong) or the function in general and cannot stop this exception from being thrown. Step 3: Stop trying to avoid the exception and instead write code to handle it gracefully. ------------------------------------------------------------------------------------------------- TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

