Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid app works on WiFi, in debug mode, or on emulator, not on cell network
    primarykey
    data
    text
    <p>I have an android application that parses some HTML, downloads an image, and displays it. I'm using an <code>AsyncTask</code> to do the HTML parsing and image downloading, but that shouldn't be relevant. I never have a problem when I'm on WiFi on my phone, when I'm using the Eclipse debugger on my phone, or when I'm using the emulator. When I have my phone on the cell network (even with pretty good reception), the image sometimes fails to display.</p> <p>I'm having a hard time figuring out what is wrong, since the problem cannot be reproduced in the debugger. Does anyone have any idea what could be wrong?</p> <p>Thanks!</p> <p><strong>Update:</strong> I have narrowed it down to the image downloading function. This way my original code:</p> <pre><code>private Bitmap downloadImage(String url) { Bitmap image = null; debug = ""; try { URL image_url = new URL(url); HttpURLConnection image_connection = (HttpURLConnection) image_url .openConnection(); image_connection.connect(); InputStream image_stream = image_connection.getInputStream(); debug = image_stream.available()+""; image = BitmapFactory.decodeStream(image_stream); } catch (Exception e) { Log.e("downloadImage", "Exception: "+e.getMessage()); } return image; } </code></pre> <p>I have also tried using the code from this tutorial, but the same bug showed up.</p> <p><a href="http://www.devx.com/wireless/Article/39810/1954" rel="nofollow noreferrer">http://www.devx.com/wireless/Article/39810/1954</a></p> <p>At this point I think it must have to do with Verizon, but I'm not sure how to figure out what's going on. I wish there was something like Wireshark for Android. I've given my code to a friend of mine on T-Mobile with the G1 and a friend on Sprint with the EVO. I have the Droid Eris on Verizon.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload