title: Take picture and save it on internal storage
body: <p>I'm trying to take a picture and save it in the internal storage so this way, only my app will have access to the pictures
  how can i do this? I'm trying a lot of things without success, even the official documentation from google is broken, here's my actual code, that saves on public directory:</p>
  
  <pre><code>@Override
      protected void onCreate(Bundle savedInstanceState)
      {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_pictures);
  
          imageView = (ImageView)findViewById(R.id.imageView);
          fabNewPicture = (FloatingActionButton)findViewById(R.id.fab_new_picture);
          fabNewPicture.setOnClickListener(new View.OnClickListener()
          {
              @Override
              public void onClick(View v) {
                  takePicture(v);
              }
          });
  
          if(ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED)
          {
              ActivityCompat.requestPermissions(this, new String[] { Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE }, 0);
          }
      }
  
      private void takePicture(View v)
      {
          Intent i = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
          file = Uri.fromFile(getOutputMediaFile());
          i.putExtra(MediaStore.EXTRA_OUTPUT, file);
  
          startActivityForResult(i, 100);
      }
  
      private static File getOutputMediaFile()
      {
          File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(
                  Environment.DIRECTORY_PICTURES), "FotoAula");
  
          if (!mediaStorageDir.exists()){
              if (!mediaStorageDir.mkdirs()){
                  return null;
              }
          }
  
          String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
          return new File(mediaStorageDir.getPath() + File.separator +
                  "IMG_"+ timeStamp + ".jpg");
      }
  
      @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
          if (requestCode == 100) {
              if (resultCode == RESULT_OK) {
                  imageView.setImageURI(file);
              }
          }
      }
  </code></pre>
  
  <p>But this way the picture will become public and available even on the gallery, I don't want that, because I need to add some database info with each picture, so I need them to be private to my app...</p>
  
  <p>How can i do this?</p>
  
  <p>Thank you!</p>