https://developer.android.com/training/data-storage/index.html

https://developer.android.com/training/data-storage/shared-preferences.html
retrieves vt. [计] 检索;恢复;重新得到

Caution: If you create a shared preferences file with MODE_WORLD_READABLE or MODE_WORLD_WRITEABLE, then any other apps that know the file identifier can access your data.

如果 shared preferences的模式为MODE_WORLD_READABLE 或者MODE_WORLD_WRITEABLE那么所有知道唯一标示的app都可以读写它。

Tip: Although apps are installed onto the internal storage by default, you can specify the android:installLocation attribute in your manifest so your app may be installed on external storage. Users appreciate this option when the APK size is very large and they have an external storage space that’s larger than the internal storage.

尽管app默认都被安装在内部存储中,你也可以指定它安装在外部存储中,通过在Manifest中指定android:installLocation就可以指定安装位置,如果你的安装包太大,或者外部存储大于内部存储时可以这么做。更多详细信息看这里

You don’t need any permissions to save files on the internal storage. Your application always has permission to read and write files in its internal storage directory.

对于app的内部存储,不要任何读写权限。

Mounted adj. 骑马的;安装好的;裱好的

Files that rightfully belong to your app and should be deleted when the user uninstalls your app. Although these files are technically accessible by the user and other apps because they are on the external storage, they are files that realistically don’t provide value to the user outside your app. When the user uninstalls your app, the system deletes all files in your app’s external private directory.

对于外部存储的私有目录,当你的app卸载时,它们也会一同被卸载,尽管这些文件理论上可以被访问因为它们在外部存储,它们实际上不会给app之外的应用程序提供任何数据。

ringtones n. 铃声(ringtone的复数)
sufficient adj. 足够的;充分的

However, the system does not guarantee that you can write as many bytes as are indicated by getFreeSpace(). If the number returned is a few MB more than the size of the data you want to save, or if the file system is less than 90% full, then it’s probably safe to proceed. Otherwise, you probably shouldn’t write to storage.

如果已经用了超过90%的空间,那么你最好不要再往外存上写入数据。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值