i want to choose a file (via file chooser) from astro manager (in my case a *.pdf or *.doc) but the uri contains only the file path (\"sdcard/my_folder/test.pdf\"
This works for me and what I use in my Share Folder app:
Create a folder called xml under resources
Add a file_paths.xml to it, with following line in it:
4.Transfer file to a different intent with 'content://' as follows:
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); //Required for Android 8+
Uri data = FileProvider.getUriForFile(this, "com.dasmic.filebrowser.FileProvider", file);
intent.setDataAndType(data, type);
startActivity(intent);