Home > Mobile >  How Android open the specified directory
How Android open the specified directory

Time:11-10

Requirements: after the download file to the local, want to take advantage of the file system manager operation, need to do is open the download directory,

CodePudding user response:

The File File=new File (filePath);
//get the parent directory
The File parentFlie=new File (File. The getParent ());
Intent Intent=new Intent (Intent. ACTION_GET_CONTENT);
Intent. SetDataAndType (Uri) fromFile (parentFlie), "*/*");
Intent. AddCategory (intent. CATEGORY_OPENABLE);
startActivity(intent);

CodePudding user response:

Tried this way, every time open directory recently,

CodePudding user response:

Call system file manager didn't seem to, or write a file management page yourself

CodePudding user response:

https://blog.csdn.net/ink_s/article/details/107080751

CodePudding user response:

https://blog.csdn.net/mozushixin_1/article/details/109223066
  • Related