Open a certain folder created by me on android [closed]

1

My application creates a folder in android and on a screen I want to have a button that when clicked opens that folder, and only the one I have specified, but so far I have not found anything about it.

    
asked by anonymous 08.12.2014 / 02:57

1 answer

2

Android has Intent that greatly facilitates these actions, which would be a call of predefined android screens / actions where you only specify what you want and the rest it takes care of for you, I believe your intention would solve with just this simple code:

Uri selectedUri = Uri.parse(Environment.getExternalStorageDirectory() + "/suaPasta/");
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(selectedUri, "resource/folder");
startActivity(intent);
    
08.12.2014 / 11:21