I have a couple of apps on Market that seem to be having issues
related to Ice Cream Sandwich.

The following code snippet will throw a FileNotFoundException on both
the Android Emulator and the the Samsung Nexus:
     URL url = new URL ("http://www.google.com";);
     URLConnection connection = url.openConnection();
     connection.setDoOutput(true);
     byte[] bytes = new byte[1024];
     InputStream is = connection.getInputStream();

Here is the stack trace that is logged:
D/AddNewTitleActivity(12424): java.io.FileNotFoundException:
http://www.google.com
D/AddNewTitleActivity(12424):   at
libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:
177)
D/AddNewTitleActivity(12424):   at
com.flyingspheres.android.inventory.network.NetworkManager.callService(NetworkManager.java:
130)
D/AddNewTitleActivity(12424):   at
com.flyingspheres.android.inventory.network.NetworkManager.retrieveHtmlContent(NetworkManager.java:
299)
D/AddNewTitleActivity(12424):   at
com.flyingspheres.android.inventory.activities.add.AddNewTitleActivity
$3$3$1.doInBackground(AddNewTitleActivity.java:336)
D/AddNewTitleActivity(12424):   at
com.flyingspheres.android.inventory.activities.add.AddNewTitleActivity
$3$3$1.doInBackground(AddNewTitleActivity.java:1)
D/AddNewTitleActivity(12424):   at android.os.AsyncTask
$2.call(AsyncTask.java:264)
D/AddNewTitleActivity(12424):   at java.util.concurrent.FutureTask
$Sync.innerRun(FutureTask.java:305)
D/AddNewTitleActivity(12424):   at
java.util.concurrent.FutureTask.run(FutureTask.java:137)
D/AddNewTitleActivity(12424):   at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
1076)
D/AddNewTitleActivity(12424):   at
java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:569)
D/AddNewTitleActivity(12424):   at java.lang.Thread.run(Thread.java:
856)

There is a pretty easy work around by using the
org.apache.http.client.HttpClient but the HttpURLConnection method
works in all versions of android,
with the except Ice Cream Sandwich.  This is a breaking change that
gives users a bad experience when upgrading their phone or
experiencing apps for the first time,
if they're coming from a different platform.

Is this a known issue intended to force app developers to use a
specific API or should I log this as a bug report?

Thanks,

-Aaron

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