我想打开名为'Songs'的文件夹,这是在按钮点击的sd卡中创建的..请任何人帮我这样做
open.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0)
{
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
Uri uri = Uri.parse(Environment.getExternalStorageDirectory().getPath() + "Songs");
intent.setDataAndType(uri);
startActivity(Intent.createChooser(intent, "Open"));
}
答案 0 :(得分:1)
试试这个:
public void Folder()
{
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
Uri uri = Uri.parse(Environment.getExternalStorageDirectory().getPath()
+ "/Songs/");
intent.setDataAndType(uri, "*/*");
startActivity(Intent.createChooser(intent, "Open"));
}