since 6 hours now im trying to simply save a picture into the internal storage of my device(in a new folder). I already read trough a lot of solutions but for some reason im not able to get it to work(File not found).. If you need more code just tell me, but this should be everything relevant to the problem
//OnActivityResult
if (requestCode == CAMERA_TAKE_PICTURE && resultCode == RESULT_OK) {
picureView.setImageURI(lastMedia);
}
//TakePictureIntent
private void cameraTakePictureIntent() {
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
lastMedia = Uri.fromFile(getOutPutMediaFile());
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT,lastMedia);
if (takePictureIntent.resolveActivity(getPackageManager()) != null) {
startActivityForResult(takePictureIntent, CAMERA_TAKE_PICTURE);
}
Log.d("cameraTakePictureIntent", "Kamera geöffnet");
}
//Output media file
private File getOutPutMediaFile(){
String fileName ="ANFRAGE_"+auftragsNummer+"_"+getAmout(auftragsNummer)+".jpg";
File mediaStorageDir = new File(getFilesDir().getAbsolutePath()+File.separator+"unsent"+File.separator);
if(!mediaStorageDir.exists())
mediaStorageDir.mkdirs();
return new File(getFilesDir().getAbsolutePath()+File.separator+"unsent"+File.separator+fileName) ;
}