为什么这么多 Android 游戏要求完全文件访问而不是使用内部存储?
Why do so many Android games ask for full file access instead of using Internal Storage?
许多主要游戏都是从请求完整文件读取权限开始的:Allow APPNAME to access photos, media, and files on your device
我假设是 android.permission.READ_EXTERNAL_STORAGE
授权任意应用程序读取您 phone 上的任何文件似乎很危险。为什么游戏不使用 Internal Storage?
我不是唯一一个提出这个问题的人,还有一些未回答的帖子 like this with the same concern. An example game 提出了这个问题。
Android 文档中实际上推荐了它:
If you are handling files that are not intended for other apps to use
(such as graphic textures or sound effects used by only your app), you
should use a private storage directory on the external storage by
calling getExternalFilesDir()
https://developer.android.com/guide/topics/data/data-storage.html#filesExternal
许多主要游戏都是从请求完整文件读取权限开始的:Allow APPNAME to access photos, media, and files on your device
我假设是 android.permission.READ_EXTERNAL_STORAGE
授权任意应用程序读取您 phone 上的任何文件似乎很危险。为什么游戏不使用 Internal Storage?
我不是唯一一个提出这个问题的人,还有一些未回答的帖子 like this with the same concern. An example game 提出了这个问题。
Android 文档中实际上推荐了它:
If you are handling files that are not intended for other apps to use (such as graphic textures or sound effects used by only your app), you should use a private storage directory on the external storage by calling getExternalFilesDir()
https://developer.android.com/guide/topics/data/data-storage.html#filesExternal