0

I am making video player app. And I want to add option like, when user taps,it opens default file manager to show this video file's location.

Here is sample from Windows OS enter image description here

Any help would be appreciated !

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Vuqar Samed
  • 73
  • 13

1 Answers1

1

You can do this by this method.

public void open_Folder(String location)
{
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
Uri uri = Uri.parse(Environment.getExternalStorageDirectory().getPath()
     + File.separator+ location + File.separator);
intent.setDataAndType(uri, "set your data type");
startActivity(Intent.createChooser(intent, "Select file manager app."));
}
Vuqar Samed
  • 73
  • 13