fix: .CSV files cannot be selected on Android using the type csv #695
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Resolve the issue on Android where .csv files cannot be selected
On /src/fileTypes.ts on line 4 the current version on master says:
csv: 'text/csv',and I replace for:
csv: 'text/comma-separated-values',With this change is possible to read csv files on Android as it should be expected. This works because when reading a .csv file using allFiles then accessing to the "type" property it returns "text/comma-separated-values".
For testing I provide this screenshots
Before the fix
Here I show the screen where the user is suppose to select a csv file
Here the user sees the file explorer, in this case the Downloads folder where I have a csv file, the csv file is display on the right window of vscode for reference of the content. We can see is a valid csv file but the code on the center window using
const res: DocumentPickerResponse = await DocumentPicker.pickSingle({ type: [DocumentPicker.types.csv], });Does not allows use to pick the csv file
After the fix
With the fix the csv file is allowed to be picked
As we see, the file is read properly and can be used on the app
This should only apply to android devices, the emulator uses API 33, Android 13.0 Tiramisu
I run yarn typescript with 0 issues
Here is the differences between my branch and main
README.md