title: Camera2 API picture taken wont show at gallery apps
body: <p>I have a camera project and im using <code>camera2 API</code> especially from this link
  <a href="https://github.com/googlesamples/android-Camera2Basic" rel="nofollow">https://github.com/googlesamples/android-Camera2Basic</a></p>
  
  <p>I can save the picture taken to my file manager located at <code>DCIM/camera</code> for example, but when I open my gallery, it wont show my last picture.</p>
  
  <p>Can anyone help me?</p>
  
  <p>One more question, I want to make my camera can be a list:
  for example, when I open "LINE" and I want take picture with camera, I want my camera appears and can be chosen.</p>
  
  <p>This is the sample code I tried for saving picture to the custom path:</p>
  
  <pre><code>@Override
  public void onActivityCreated(Bundle savedInstanceState) {
      super.onActivityCreated(savedInstanceState);
      mFile = new File("/storage/emulated/0/DCIM/Camera", "pic.jpg");
      int counter=1;
      while (mFile.exists()) {
          mFile = new File("/storage/emulated/0/DCIM/Camera", "pic" + String.format("%02d", counter) + ".jpg");
          counter++;
      }
  
  }
  </code></pre>