In Android 13 version or SDK 33 How to access all files in android devices and also give permission of Allow management of all files, I have try requestLegacyExternalStorage, defaultToDeviceProtectedStorage, requestLegacyExternalStorage="true" and READ_INTERNAL_STORAGE, WRITE_INTERNAL_STORAGE permission but not working.
In android 11 and 12 is working fine but In android 13 it's not working.
if (ActivityCompat.shouldShowRequestPermissionRationale(requireActivity(), android.Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("application/pdf");
startActivityForResult(intent, SELECT_FILE_REQUEST);
} else {
ActivityCompat.requestPermissions(requireActivity(), new String[]{android.Manifest.permission.WRITE_EXTERNAL_STORAGE}, PERMISSION_REQUEST_CODE);
}