I need to let the user select a file from their local storage for my application. Right now I'm using INTENT.ACTION_GET_CONTENT
to let the user select the file, but it also gives the option of selecting URI from the cloud. After I get the URI file, I treat it as a local file and perform various things (including extracting the file extension). How can I let the user only pick local files?
else if(menuItem.getItemId() == R.id.action_import_from_file){
Intent i = new Intent(Intent.ACTION_GET_CONTENT);
i.setType("*/*");
startActivityForResult(Intent.createChooser(i, "Pick a file"), REQUEST_CODE_SELECT_FILE_FOR_IMPORT);
}