模仿 Android API Level 8 之前的 Context.getExternalFilesDir() 吗?
Android API 级别 8 引入了 Context.getExternalFilesDir()
方法,提供对特定于您的应用的 SD 卡路径的 File
对象引用。我想知道如何模仿低至 API 级别 5 的功能。
我看到有一个 Context.getDir()
方法,但我无法从阅读中看出它有何不同。
Android API level 8 introduced the Context.getExternalFilesDir()
method, providing a File
object reference to an SD card path specific to your app. I am wondering how to mimic this as low as API level 5.
I see there is a Context.getDir()
method, but I can't tell from reading about it how this differs.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我最终在此处找到了答案。这是该页面的摘录,它回答了我的确切问题:
I ended up finding the answer here. Here's an excerpt from that page that answers my exact question: