I get from the Internet to find the Android network picture of the code, you can run your own test again, (the picture url is http://www.baidu.com/img/baidu_sylogo1.gif).
But for a moment the image url, changed http://www.xzbicycle.com/xzmap/ibikegif.asp?id=10&flag=1, the result Bitmap is empty picture for failure, why ah? Which Great God help
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Is empty, then there should be a log of it. The best and most direct way to analyze the problem is to look at the log to identify the location of the source in question come from the log inverse.
Reply:
View LogCat
Reply:
@ Override
protected Bitmap doInBackground (String. .. urls) {
/ / TODO Auto-generated method stub
String url = urls [0];
Bitmap tmpBitmap = null;
try {
. InputStream is = new java.net.URL (url) openStream ();
tmpBitmap = BitmapFactory.decodeStream (is);
} Catch (Exception e) {
e.printStackTrace ();
Log.i ("test", e.getMessage ());
}
boolean hh = tmpBitmap == null;
Log.e ("image", hh + "!!!!!");
return tmpBitmap;
}

No exception error, just an empty display Bitmap
Reply:
Why is the url for a moment it would not be
Reply:
You return to the url seems to be a web page, which has a map, not a true picture of the address bar.
Reply:
url special characters need to transcode the browser automatically transcoding too, such as on the &? require transcoding
Reply:
Not the issue of access to data, and the feeling that the picture in question.
I've tested, even save the picture down into the resource file, R.drawable.xxx or not displayed
Reply:
How to do that, I tried a lot of ways will not work, the project to use the picture in the data, crazy
Reply:
url is not correct it, you are in for a try another URL
Reply:
url must be positioned to address the specific picture
Reply:
I am using the url Fiddler2 found, to refer to the picture data information, does not make sense to change url
Reply:
On Samsung phones can be tried by way of pictures, though I do not know why, thank you
No comments:
Post a Comment