android :images not being displayed
I am making an android app in which i need to display the remote images in my app my using fol开发者_JAVA百科lowing code. but the images are not being displayed:
for(int i=0;i<stringOnTextView.length;i++){
imageUrl = "http://ondamove.it/English/images/users/";
imageUrl = imageUrl+stringOnTextView[i];
System.out.println(imageUrl);
URL myFileUrl = new URL(imageUrl);
HttpURLConnection conn= (HttpURLConnection)myFileUrl.openConnection();
conn.setDoInput(true);
conn.connect();
InputStream is = conn.getInputStream();
bmImg = BitmapFactory.decodeStream(is);
image.setImageBitmap(bmImg);
System.out.println(bmImg.toString());
}
Can anyone tell me where is the problem. thanks
as a completion of my comment , see this three tutorials and you will find out what you should do :) :
tuto1
tuto2
tuto3
精彩评论