Trying open a specific folder in android using intent

android, android-intent

Solution

It works:

Uri selectedUri = Uri.parse(Environment.getExternalStorageDirectory() + "/myFolder/");
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(selectedUri, "resource/folder");
startActivity(intent); 

Have a nice codding :)

EDIT: If the current solution doesn't help you, then these file/directory choosers libraries can be helpful: https://android-arsenal.com/tag/35

Problem

I am trying to open a specific folder in android ?Is it possible to open a specific folder ???? this is the code i m using ``` config=(Button)findViewById(R.id.btn_cf); config.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent("Intent.ACTION_GET_CONTENT"); Uri uri = Uri.parse("mnt/sdcard/myfiles/allfiles/download"); intent.setDataAndType(uri, "*/*"); startActivity(Intent.createChooser(intent, "download")); } }); ```

Original source

Related problems