As I am newbie in android and PHP getting lots of struggles, here is a new one.
I successfully uploaded an image from my android application to WAMP server. The process I used is, select an image from SD card, place it on Image view and the same image will get uploaded on WAMP server in the directory "www\Images".
Now, the reverse way, when a user successfully logs into the system, he/she should see his/her last uploaded image on image view.
This process works fine till uploading image on server. But I am unable to download the same image.
I tried something like the following,
ImageView imcage = (ImageView)findViewById(R.id.ObjImgNormalUser);
//start the download
Bundle bundle = getIntent().getExtras();
String usrName = bundle.getString("usrName");
String Url = "http://172.25.64.188/Images/";
Url = Url + "ABC"; //image name on server
Url = Url + ".JPG";
try
{
InputStream inputStream = (InputStream)new URL(Url).getContent();
Bitmap bmp = BitmapFactory.decodeStream(inputStream);
imcage.setImageBitmap(bmp);
}
But it is not working.
Please suggest me how to download an image from WAMP server and display it on image view in an android application.