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"));
}
});
I found a solution in this GitHub repo
The code :
If you want open & browse file: FileBrowser.class
If you want to get user chosen file's URI: FileChooser.class
Pick root:
try to replace your code with this line
It works:
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