In IOS it works very well, but in android i got this error:
Invalid Filesystem URI 'file:///data/user/0/host.exp.exponent/files/ExperienceData/%2540my_user%252Fmy-react-native-app/my_file.ext', make sure it's in the app's scope.
Hey, I’m experiencing the same issue. It seems like there’s something wrong with the path that’s generated for android. Not sure how to approach it but I know it occurs for more than just downloading.
simple example that produces the same error on android but works on iOS:
saveDbData = async () => {
const { data, isLoaded } = this.state;
for (let i = 0; i < data.length; i++) {
const mediaData = data[i];
const dbResult = await insertPlace(
mediaData.artist,
mediaData.image,
mediaData.title,
mediaData.url
);
const { uri } = await FileSystem.getInfoAsync(
`${FileSystem.documentDirectory}SQLite/${'places.db'}`
)
console.log("THIS IS PATH OF THE DB",uri)// WHEN U WANT SEE THE PATH OF THE DB FILE
}
const fetchawesome = await fetchPlaces();
console.log("THIS MY DB :",fetchawesome) //WHEN U WANT PRINT THE CONTENT OF THE DB
};