Unable to save image file in android oreo update. How to do it?
问题 I can't save an image file in android oreo(8.0) api 26. The code is working perfectly in api level 25 (7.0) and I didn't find any changes in the documentation "Android 8.0 Behavior Changes" Here is my code String root = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).toString(); File myrootDir = new File(root); if (!myrootDir.exists()) { myrootDir.mkdir(); } File myDir = new File(root + "/Myimages"); if (!myDir.exists()) { myDir.mkdir(); } final String fname =