this is the code I'm using.
link contain image http://mycapturetest.byethost17.com/Screen.jpg
when i update image on URl and open it on browser. it shows updated image.
but when open the same link in android application it keep showing the last image uploaded on the URl. (Not the new one)
private class DownloadImageTask extends AsyncTask<String, Void, Bitmap> {
ImageView bmImage;
public DownloadImageTask(ImageView bmImage) {
this.bmImage = bmImage;
bmImage.setImageDrawable(null);
bmImage.setImageBitmap(null);
}
protected Bitmap doInBackground(String... urls) {
String urldisplay = urls[0];
Bitmap mIcon11 = null;
try {
InputStream in = new java.net.URL(urldisplay).openStream();
mIcon11 = BitmapFactory.decodeStream(in);
} catch (Exception e) {
Log.e("Error", e.getMessage());
e.printStackTrace();
}
return mIcon11;
}
protected void onPostExecute(Bitmap result) {
bmImage.setImageDrawable(null);
bmImage.setImageBitmap(null);
bmImage.setImageBitmap(result);
Toast.makeText(MainActivity.this, "set....", Toast.LENGTH_SHORT).show();
}
}