打开android手机sdcard文件夹目录
2012-08-06 15:53
411 查看
// 打开文件夹的方法
public void OpenFile() {
try {
Intent intent = new Intent();
/* 开启Pictures画面Type设定为image */
intent.setType("image/*");
/* 使用Intent.ACTION_GET_CONTENT这个Action */
intent.setAction(Intent.ACTION_GET_CONTENT);
/* 取得相片后返回本画面 */
startActivityForResult(intent, SHOW_ACTIVITY_TWO);
} catch (ActivityNotFoundException e) {
// TODO: handle exception
Toast.makeText(Index.this, "can not open File", Toast.LENGTH_LONG)
.show();
}
}
public void OpenFile() {
try {
Intent intent = new Intent();
/* 开启Pictures画面Type设定为image */
intent.setType("image/*");
/* 使用Intent.ACTION_GET_CONTENT这个Action */
intent.setAction(Intent.ACTION_GET_CONTENT);
/* 取得相片后返回本画面 */
startActivityForResult(intent, SHOW_ACTIVITY_TWO);
} catch (ActivityNotFoundException e) {
// TODO: handle exception
Toast.makeText(Index.this, "can not open File", Toast.LENGTH_LONG)
.show();
}
}
相关文章推荐
- Android之用UncaughtExceptionHandler实现保存崩溃日志到sdcard目录下的文件夹
- /mnt/sdcard或者/sdcard这是Android手机中SD卡的文件夹路径
- Android获取SDcard目录及创建文件夹的方法
- Android根目录下面的sdcard和mnt文件夹下面的sdcard
- android 文件浏览。打开sdcard文件夹。只显示文件夹和txt文件。选择txt文件返回其名字
- Android 手机sdcard目录或文件的拷贝、移动、删除(递归)
- Android 手机sdcard目录或文件的拷贝、移动、删除(递归)
- Android 遍历SDCARD的文件夹并显示目录信息
- Android获取SDcard目录及创建文件夹;
- 获取android 手机的sdcard 信息
- android崩溃日志保存sdcard打开并发送到email
- Android File 转Inputstram,跳转手机sdcard 获取指定文件
- android sdcard下创建文件夹
- Android中让应用程序自动安装到手机内存及判断应用程序是否安装在SDCard中
- Android中在sdcard上创建文件夹
- (转)Android中让应用程序自动安装到手机内存及判断应用程序是否安装在SDCard中
- Android 读取sdcard指定目录文件
- 安卓手机或者平板文件系统中出现自动创建 SDCARD/JOY 目录的解决办法
- android 访问data目录、6.0模拟器读写sdcard、相关sdcard路径
- 【android】下载文件至本应用程序的file目录或者sdcard