本站已关停,现有内容仅作科研等非赢利用途使用。特此声明。
查看: 2916|回复: 0
打印 上一主题 下一主题

在Kitkat版本上应该使用新的SD Card API

[复制链接]
跳转到指定楼层
1#
发表于 2014-1-22 11:12:12 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
大家好!

这是来自我的同事Steven Zhang 有关最近不少国内厂商提出的在Kitkat版本上使用新的SD Card API所碰到的问题的解释信息 - 很多使用老的API会碰到无法储存信息到外插的SD卡。希望这个信息对国内的开发者们有参考价值:


Recently, some of the OEM like Huawei, Lenovo, ZTE raised their concern about our new external SD Card API and permission change in Kitkat.

Start from Kitkat, we have adjusted the extermal SD Card access API. In the http://developer.android.com/about/versions/android-4.4.html , we have the following info:

If your app reads from external storage...

Your app can not read shared files on the external storage when running on Android 4.4, unless your app has theREAD_EXTERNAL_STORAGE permission. That is, files within the directory returned bygetExternalStoragePublicDirectory() are no longer accessible without the permission. However, if you need to access only your app-specific directories, provided by getExternalFilesDir(), then you do not need theREAD_EXTERNAL_STORAGE permission.


More info can be found at http://developer.android.com/training/basics/data-storage/files.html .

This means only preloaded app can have full access.  And 3rd party apps will only have full access for their private data or read access for public folders in external storage.

The OEMs have tested their Kitkat devices against the popular apps, they found a lot of issue. Except the ES File Manager, other popular apps like wechat, sina weibo, QQ, Baidu video, Kugou...., they are still using old API. So this means they can not access the files on the external sdcard.  And, some apps will download files into external sdcard will totally fail.


[size=12.800000190734863px]




ChinaGDG.com
回复

使用道具 举报

*滑动验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表