I am currently facing an issue with Google pixel phones not letting the app save photo to a specific file location (mentioned below). I don't know if this is something to do with the scoped-storage because the app is running perfectly fine with 4000+ android 12 devices and this only happens to google pixel devices.
(content://com.au.APP_NAME/data/user/0/com.au.APP_NAME/cache/APP_NAMEPicture-Cache/1660.jpg)
private void startCameraIntent() {
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
String filePath = FileProvider.contentUri + StorageManager.createPictureCacheFileName(getContext());
//filePath = content://com.au.APP_NAME/data/user/0/com.au.APP_NAME/cache/APP_NAMEPicture-Cache/1660.jpg
StorageManager.saveCameraCaptureImageFilePathToSharedPreferences(getContext(), filePath);
Uri fileURI = Uri.parse(filePath);
intent.putExtra(MediaStore.EXTRA_OUTPUT, fileURI);
startActivityForResult(intent, Constant.TAKE_PHOTO_FROM_CAMERA_ACTIVITY_TAG);
}