获取Android设备/仿真器的根目录 [英] Get Android device/emulator root directory

查看:121
本文介绍了获取Android设备/仿真器的根目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发使用Eclipse / Ubuntu的Andr​​oid应用程序。像往常一样,我做在一个AVD模拟器的第一枪。我想到位,我可以对当前模拟器中和最终物理设备(SD存储卡)上使用了独特的文件夹结构。
什么是Android的环境变量拿起通过程序为类型的虚拟和物理设备的根目录下(当然JAVA),这样我可以有我的出发参考?
谢谢
PS:我DDMS文件资源管理器打开,如果答案是指结构有

I am developing an Android application using Eclipse/Ubuntu. As usual, I am doing the first shot on an AVD emulator. I would like to put in place a unique folder structure that I can use on both the current emulator and on the final physical device (the SD memory card). What would be the Android environment variable to pick up the root directory by program (Java of course) for both type of virtual and physical devices, so that I can have my starting reference? Thanks PS: I have the DDMS File Explorer open, in case the answer refers to the structure there

推荐答案

您可以看到的 http://developer.android.com/reference/android/os/Environment.html 获得与 getExternalStorageDirectory()方法相同的目录

You can see that http://developer.android.com/reference/android/os/Environment.html to get the "same" directory with getExternalStorageDirectory() method

这篇关于获取Android设备/仿真器的根目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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