Android - 将文件保存到内部存储器
我在资产中有文件,我需要将此文件写入内部存储器(不是作为 /data/data/mypackage/files 的私有部分,而是写入我能够看到的可移动磁盘的内存,当我连接到电脑)。有什么办法可以实现这一目标吗?我指的不是文件复制的方法,而是如何访问我的内存?
I have file in Assets and I need to write this file to the Internal memory (not to the private part as a /data/data/mypackage/files, but to the memory I am able to see as a removable disk, when I am connected to PC). Is there any way how to achieve this? I don't mean the method for file copy, but how to access my internal memory?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是回答这个问题的讨论。我假设您想将资产复制到 SD 卡。
如何将文件从“assets”文件夹复制到SD卡?
Here is a discussion that answers this problem. I'm assuming that you want to copy your asset to the SD card.
How to copy files from 'assets' folder to sdcard?
我不完全确定你在问什么,听起来你想写入SD卡,但这通常也被认为是外部存储器。如果这就是您的意思,那么这里是您需要阅读的文档: http://developer.android.com/guide/topics/data/data-storage.html#filesExternal
I'm not entirely certain about what you are asking, it sounds like you want to write to the SD card, but that's also usually considered external memory. If this is what you mean though, here is the documentation you need to read: http://developer.android.com/guide/topics/data/data-storage.html#filesExternal