To save generic files to shared storage in the latest Android SDK (Android 10+):
Request write and read external storage permissions.
Use the Storage Access Framework (SAF) to pick a location.
Handle the selected location's URI and write your file using a ContentResolver.
To allow file access from an Android WebView, use these settings:
Set webView.getSettings().setAllowFileAccess(true);
Ensure you have the READ_EXTERNAL_STORAGE permission in your AndroidManifest.xml for accessing device files.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.