You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of Helper.APP_FOLDER directory for saving the file, we can use getFilesDir()
//After API 23 permission request is asked at runtime
int EXTERNAL_STORAGE_PERMISSION_CODE = 23;
//Requesting Permission to access External Storage
ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},
EXTERNAL_STORAGE_PERMISSION_CODE);
//It creates an app-specific directory, hidden from users and deleted with the app
File folder = getActivity().getFilesDir();
Environment.getExternalStorageDirectory
has been deprecated in Android Q. It should stop working in Android R. This is done to ensure privacy.The new alternative for File handling is the
Storage Access Framework
.https://github.com/baldapps/Flipper
is a library that helps in keeping the old behaviour and can be tried.The text was updated successfully, but these errors were encountered: