Pick image for crop from gallery and camera it\'s done for below Android 7.0 but in Android Nought it crashes in camera. I use fileprovider for it but doesn\'t work.
Uri uri = FileProvider.getUriForFile(this, getPackageName() + Configs.FILE_PROVIDER_NAME, inFile);
Intent intent = new Intent("com.android.camera.action.CROP");
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
intent.setDataAndType(uri, "image/*");
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(outFile));
You should notice that the uri for EXTRA_OUTPUT should not be modified by FileProvider. And your paths.xml should like this
Because you create crop file under getExternalFilesDir. So is necessary.