I have an app that read values from an external devices. I save these data in a .csv format in the Download directory.
What I would to do is to share or open this file when they are clicked.
I use react-native FS
componentDidMount(){ this.readingValue() } async readingValue() { // get a list of files and directories in the main bundle :ExternalStorageDirectoryPath const elementiDirectory = await RNFS.readDir(RNFS.ExternalStorageDirectoryPath + '/Download/') const pathElementi = elementiDirectory.map(e => e.path); //console.log("filter " + pathElementi) const pathCSV = pathElementi.filter(path => { const reg = /sd\d+\.csv/; return reg.test(path); }); console.log("risultati " + pathCSV) this.setState({risultati : pathCSV}); } render() { return ( <View> <Text>{this.state.risultati}</Text> </View> ); } This code show the path of the .csv file saved. Do you know how can I do to open this file give to the user the possibility to choose the method??