title: notify image moved to another folder
body: <p>I am a beginner android programmer. I create a project for hiding image. But, I have a problem in my project. Is that:
  I use a method to move a photo from the folder <code>A</code> to folder <code>.B</code>(Here is how I hid it from image gallery) . I am sure that the picture in the folder <code>A</code> was deleted and moved to folder <code>.B</code>. However, when I open image gallery application I still see this picture is displayed at the folder <code>A</code>.</p>
  
  <p>This is method copy picture to folder <code>.B</code>:</p>
  
  <pre><code>    public static String copyFile(String path) {
          //TO DO: create folder .B
  
          File pathFrom = new File(path);
          File pathTo = new File(Environment.getExternalStorageDirectory() + "/.B");
          File file = new File(pathTo, fileToName);
  
          while (file.exists()) {
              fileToName = String.valueOf(System.currentTimeMillis());
              file = new File(pathTo, fileToName);
          }
  
          InputStream in = null;
          OutputStream out = null;
          try {
              in = new FileInputStream(pathFrom);
              out = new FileOutputStream(file);
  
              byte[] data = new byte[in.available()];
              in.read(data);
              out.write(data);
              in.close();
              out.close();
  
              return file.getPath();
          } catch (FileNotFoundException e) {
              Log.e(TAG, e.getMessage());
              return "error:" + e.getMessage();
          } catch (Exception e) {
              Log.e(TAG, e.getMessage());
              return "error:" + e.getMessage();
          }
      }
  </code></pre>
  
  <p>After copy picture to folder <code>.B</code>, I delete this picture in folder <code>A</code>:</p>
  
  <pre><code>new File(path).delete();
  </code></pre>
  
  <p>So Is there any suggestion for notify for all image gallery know that this picture was moved to another folder or another URI?</p>
  
  <p>**UPDATE: The suggestion for me work fine is:
  Before 4.4,you can call this:</p>
  
  <p>sendBroadcast(new <code>Intent(Intent.ACTION_MEDIA_MOUNTED,Uri.parse("file://"+Environment.getExternalStorageDirectory())));</code> 
  After 4.4,try this:</p>
  
  <pre><code>sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.parse("file://" + file)));
  </code></pre>
  
  <p>//the file is new image's path</p>
  
  <p>THank FireSun and everyonce</p>