I have this peice of code that throws an UnknowHostException when the
host is not found.
How can I handle this to send a message to the screen that the host is
currently unavailable.
I'm using the host to get an exchange rate and then make a
calculation.  here is the code:

   //calculate conversion to CAD

   if (checkUS.isChecked()) {

           // get currency rate using xml feed  1USD -> 1CAD
           MessageList currency = new MessageList();
           String strConversion = currency.loadFeed();        //error
is on this line
           String delims = "[()]";
           String[] tokens = strConversion.split(delims);
            double currencyRate =
Double.valueOf(tokens[1].trim()).doubleValue();

             totalCost = totalCost * currencyRate;
    }

-- 
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

Reply via email to