Android 4.4 Kitkat和第二个外部存储 [英] Android 4.4 Kitkat and second external storage

查看:65
本文介绍了Android 4.4 Kitkat和第二个外部存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已经有很多关于Kitkat外部sdcard写入权限的文章,但是我不清楚它是如何工作的.不幸的是,我没有带sdcard插槽的Kitkat设备.问题是,我是否可以完全写入辅助外部存储?基于文档.

There has been written a lot about Kitkat external sdcard write permission but it's not clear to me how it works. Unfortunately I don't have Kitkat device with sdcard slot. Question is, can I write to secondary external storage at all? Based on the docs.

不允许应用程序写入辅助外部存储 设备,但在特定于软件包的目录中

Apps must not be allowed to write to secondary external storage devices, except in their package-specific directories

如果了解,如果没有权限,我可以写到主外部存储/sdcard/Android/data/package/...上的特定于应用程序的文件夹,也可以写到辅助外部存储/extSdcard/Android/data/package/...

If in understand it, If I don't have permission I can write to the app specific folder on primary external storage /sdcard/Android/data/package/... and to the app specific folder on secondary external storage /extSdcard/Android/data/package/...

并且使用WRITE_EXTERNAL_STORAGE我可以写到主外部存储上的所有位置/sdcard/*,但是我不能写到辅助外部存储上的任何位置(应用专用文件夹除外)?

and with WRITE_EXTERNAL_STORAGE I can write to all locations on primary external storage /sdcard/* but I can't write to any location on secondary external storage (except app specific folder)?

感谢所有答案!

推荐答案

您的分析是正确的,除了假设主外部存储为/sdcard(确切路径因设备,操作系统级别和Android 4.2用户帐户而异) +平板电脑).

Your analysis is correct, other than assuming that primary external storage is /sdcard (the exact path varies by device, OS level, and user account for Android 4.2+ tablets).

以下是我最近在上写的一些博客文章.外部存储可移动(次级外部" )存储.

这篇关于Android 4.4 Kitkat和第二个外部存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆