0

I want to show downloaded file in File Manager by giving the File absolute Path.I read a lot about it and find same thing

Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
Uri uri = Uri.parse(file.getAbsolutePath());
intent.setDataAndType(uri, "*/*");
startActivity(Intent.createChooser(intent, "Open folder"));

And it results to view only recent files that has been viwed. Please guide to Open File Manager while navigating it to file whose absolute path has been given.

  • have you checked this [SO](https://stackoverflow.com/questions/50072638/fileuriexposedexception-in-android/50102119#50102119) ? – Sagar May 19 '18 at 14:39

1 Answers1

0

I read a lot about it and find same thing

ACTION_GET_CONTENT has little to do with a file manager.

Please guide to Open File Manager while navigating it to file whose absolute path has been given.

There is nothing on Android for this, sorry.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Then is there any substitution to show downloaded file in storage folder directory. – Rai Mashhood Qadeer Bhatti May 19 '18 at 11:11
  • @RaiMashhoodQadeerBhatti: I do not know what you mean by "show downloaded file in storage folder directory". There is no requirement for an Android device to have a full-fledged file manager app. The UI that you might see by default for `ACTION_GET_CONTENT` is part of the Storage Access Framework. That is the Android equivalent of "file save-as" and "file open" dialogs that you might find in a desktop OS, not a true file manager. – CommonsWare May 19 '18 at 11:34
  • Ok I Confess it then how can I use `ACTION_GET_CONTENT` to view only file which path I have given as uri – Rai Mashhood Qadeer Bhatti May 19 '18 at 11:42
  • 1
    @RaiMashhoodQadeerBhatti: That is not supported, sorry. – CommonsWare May 19 '18 at 11:43