DEV Community

Mayank
Mayank

Posted on

Answer:

!! IMPORTANT !!

Environment.getExternalStorageDirectory() is deprecated and Context#getExternalFilesDir(String), MediaStore, or Intent#ACTION_OPEN_DOCUMENT, should be used instead.

This method was deprecated in API level 29 To improve user privacy, direct access to shared/external storage devices is deprecated. When an app targets Build.VERSION_CODES.Q, the path returned from this method is no longer directly…

Top comments (0)