title: Updating Imageview after image upload to server in android
body: <p>I am developing an app in which I am changing profile pic and send it server to store.But my problem is as soon as I after updating image and go back from the activity and come again to the same activity, the old image will be there replacing my new one which i have send to server.That is image saved in server in not getting in the ImageView.I am using Multipart Request to send image to server.If any one knows the solution please let me know that,I will be very gratefull.</p>
  
  <pre><code>private class SendGroupPicToServer extends AsyncTask&lt;File, Integer, String&gt; {
  
      @Override
      protected String doInBackground(File... params) {
  
          System.out.println("inside do in background " + grp_id + "  "
                  + userid);
  
          final File imagefile = params[0];
  
          RequestQueue requestQueue = MySingleton.getInstance(
                  GroupProfile.this).getRequestQueue();
  
          Map&lt;String, String&gt; arguments = new HashMap&lt;String, String&gt;();
          arguments.put("group_id", grp_id);
          arguments.put("user_id", userid);
  
          MultipartRequest multipartRequest = new MultipartRequest(
                  updateGroupPicUrl, arguments,
                  new Response.Listener&lt;String&gt;() {
                      @Override
                      public void onResponse(String response) {
                          System.out.println("Response from Abey  "
                                  + response);
                          try {
                              ResponseClass rDetails = (new Gson()).fromJson(
                                      response, ResponseClass.class);
                              if (rDetails.Result.equals("Success")) {
                                  profile.postInvalidate();
  
                              }
                          } catch (Exception e) {
                          }
                      }
                  }, new Response.ErrorListener() {
                      @Override
                      public void onErrorResponse(VolleyError error) {
                          Toast.makeText(GroupProfile.this, error.toString(),
                                  Toast.LENGTH_SHORT).show();
                          System.out.println("Upload Image response is "
                                  + error.toString());
                          if (error instanceof NetworkError) {
                          } else if (error instanceof ServerError) {
                          } else if (error instanceof AuthFailureError) {
                          } else if (error instanceof ParseError) {
                          } else if (error instanceof NoConnectionError) {
                          } else if (error instanceof TimeoutError) {
                          }
                      }
                  }, imagefile, "IMAGE");
          requestQueue.add(multipartRequest);
          return null;
      }
  
      @Override
      protected void onPostExecute(String result) {
          // TODO Auto-generated method stub
          super.onPostExecute(result);
          System.out.println("Image updation is  " + result);
      }
  
  }
  </code></pre>