您的位置:首页 > 移动开发 > Android开发

打开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();

}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: