Hi,

My app uses a simple HttpConnection to download and parse some XML
that I host. The important code is as follows:-

                URL url = new URL(urlStr);
                URLConnection connection = url.openConnection();
                HttpURLConnection httpConnection = (HttpURLConnection)
connection;
                int responseCode = httpConnection.getResponseCode();

                if(responseCode == HttpURLConnection.HTTP_OK) {
                        // do useful stuff here
                }
                else {
                                               // display connection
failed error message here
                }

This works all the time on my G1 (based in UK), but a number of my
users are complaing they always see the connection failed message.
This is even though they have 3G connections and can browse the
internet, use google maps etc.

Can you see that I'm doing something obviously wrong?

Is there a more robust way to connect?

Any advice greatly appreciated,

Ryan


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to