Does it always glitch on the same image, or is it random images? If it is the same image each time, you should consider the possibility that it is corrupt at the source, and nothing wrong with your code. It's also theoretically possible that you just have a bad connection on those occasions. If you can get it to happen on the same image every few attempts, then narrow your code down to fetching just that one image over and over again - and make use of the logging you are doing. That way it can record whether the attempt failed or not, and if you show the image right after calling it, and press a button to try again (before you fill up the log and lose your place), you will know from the log at the time you see a corrupt image what exactly happened in code. This should help you confirm your theory. You could also try showing the uncompressed image as well as the compressed result, in case the compression is the problem... somehow. The only thing that I notice in your code is that when the status code returned is not OK, you do not call consumeContent(), even though you open and close the content stream. Whether or not you need to I don't know, but it couldn't hurt (too much) to try.
-- 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

