Open folder on card

前端 未结 2 735
耶瑟儿~
耶瑟儿~ 2021-01-07 00:55

I thought this was something really simple, but it\'s giving me more work than the rest of the whole app.

I just want a button to open the \"Downloaded Files\" folde

2条回答
  •  无人及你
    2021-01-07 01:29

    I think this one could work for you:

    Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
    Uri uri = Uri.parse(Environment.getExternalStorageDirectory().getPath()
        + "/yourFolder/");
    intent.setDataAndType(uri, "*/*");
    startActivity(Intent.createChooser(intent, "Open /sdcard/yourFolder"));
    

提交回复
热议问题