WRITE_EXTERNAL_STORAGE permission is not required in AndroidQ with target API level 29, does it breaks security?

一笑奈何 提交于 2019-12-11 13:18:17

问题


I have stored image file into External Directory through Media store but it doesn't required permission for AndroidQ, even i have not mention permission in manifest.

compileSdkVersion 29

defaultConfig {
        minSdkVersion 21
        targetSdkVersion 29
    }

Note: Any application can store files on external storage without requesting permission to user, so is it break down security violation?


回答1:


The argument, as I understand it, is that with MediaStore you are only supposed to be able to write to a few locations, based on the media type. MediaStore is supposed to be validating that your request seems legitimate.

However, somebody (perhaps you?) suggested that IS_RELATIVE allows writing in arbitrary locations. If that were the case, then I would be much more concerned.




回答2:


An app that uses scoped storage always has read/write access to the files that it creates, both inside and outside its app-specific directory. As a result, if your app saves and accesses only the files that it creates, you don't need to request the READ_EXTERNAL_STORAGE or WRITE_EXTERNAL_STORAGE permission.

For more information - [here]



来源:https://stackoverflow.com/questions/58433728/write-external-storage-permission-is-not-required-in-androidq-with-target-api-le

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!