Em dùng intent để lấy đường dẫn file mình chọn như sau:
Intent inputFile = new Intent(Intent.ACTION_PICK);
inputFile.setType("*/*");
inputFile.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(inputFile.createChooser(inputFile, "Select csv"), 1010);
nhưng mà đường dẫn nhận được thì không thể dùng FileInputStream để đọc được ạ.
VD: path nhận được qua intent là: /document/primary:File.csv
path mong muốn để đọc file là: /storage/emulated/0/File.csv
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?