1
I have a code where I’m using my camera to take a picture, then I put it in a Imageview, only for viewing as it is saved then in my Sqlite. I wonder, how do I delete this photo from the gallery, since it is already in the database.
This is my code, here I am opening the camera and taking the picture.
private void tirarFoto() {
    Intent it = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
    if (it.resolveActivity(getPackageManager()) != null) {
         startActivityForResult(it, REQUEST_IMAGE_CAPTURE);
    }
}
Here I am taking the image taken and putting in Imageview
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
   if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK) {
      Bundle extras = data.getExtras();
      Bitmap imagem = (Bitmap) extras.get("data");
      imgEntrada.setImageBitmap(imagem);
   }
}