title: Android rename retrieved image file
body: <p>I have an image path, say </p>
  
  <blockquote>
  <pre><code>/storage/emulated/0/PurTab/2148094.jpg
  </code></pre>
  </blockquote>
  
  <p>I want to get this image to file and rename it to <strong>XYZ.jpg</strong> and get it in a file. </p>
  
  <p>What I tried was </p>
  
  <pre><code>//get file
  File photo = new File(baseApp.getObserver().getTempImageFilePath());
  
  //resave file with new name
  File newFile = new File("XYZ.jpg");
  photo.renameTo(newFile);
  </code></pre>
  
  <p>But not working. 
  how to do this..... ?? </p>