Android:将外部存储器上的文件夹设为私有或受保护

我想在外部存储器(可能在SD卡上)上创建一个私有或受保护的文件夹,以便只有我的应用程序/进程可以访问该文件夹.

我可以这样做吗?如果是的话请告诉我?

我的要求:
我可以使用android的内部存储器存储我的应用程序的文件/数据,但这可能会减少手机的内部存储器(这可能会导致问题,例如没有足够的空间供其他应用程序安装等)

最佳答案 外部存储的数据不能是私有的.它具有世界可读性,如果用户启用USB海量存储,则可以由用户进行更改.

引自developer.android.com:

Every Android-compatible device supports a shared “external storage” that you can use to save files. This can be a removable storage media (such as an SD card) or an internal (non-removable) storage. Files saved to the external storage are world-readable and can be modified by the user when they enable USB mass storage to transfer files on a computer.

点赞