//Library you need
implementation 'net.sourceforge.jexcelapi:jxl:2.6.12'
implementation 'com.nbsp:library:1.8'
1. code:
new MaterialFilePicker()
.withActivity(this)
.withRequestCode(1)
.withFilter(Pattern.compile(".*\\.txt$")) // Filtering files and directories by file name using regexp
.withFilterDirectories(true) // Set directories filterable (false by default)
.withHiddenFiles(true) // Show hidden files and folders
.start();