I donβt understand why people say that they are stored in external storage, because when I use this code and I check that my SD card does not have a file
Code This
OutputStream imageFileOS; int imageNum = 0; Intent imageIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); File imagesFolder = new File(Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_PICTURES), "Punch"); if(!imagesFolder.exists()){ imagesFolder.mkdirs(); // <---- } String fileName = "image_" + String.valueOf(imageNum) + ".jpg"; File output = new File(imagesFolder, fileName); while (output.exists()){ imageNum++; fileName = "image_" + String.valueOf(imageNum) + ".jpg"; output = new File(imagesFolder, fileName); } Uri uriSavedImage = Uri.fromFile(output); imageIntent.putExtra(MediaStore.EXTRA_OUTPUT, uriSavedImage);
when I run the code and check it has a file in "Internal Memory / Pictures / Punch / image_0.jpg", but not see in SD CARD (SD CARD = external memory card 16 GB) Please help me ..
source share