Open mtshv opened 1 month ago
Hey there, Have you found the correct path for that? Pls tell me how you managed that issue.
@vSyrotkinRelevant for now, I am using
import * as FileSystem from 'expo-file-system';
const downloadPath = FileSystem.documentDirectory
As this approach returns the existing directory for both ios
and android
, I think you can achieve the same with other filesystem libraries for React Native.
I haven't tested this extensively yet, so I can't guarantee that it's the ultimate solution. But this is what I have for the moment
P.S. Still very curious about the RNBackgroundDownloader.directories.documents
issue that I am seeing. And wonder what users of this package are using for download directories on Android. Perhaps @kesha-antonov could shed some light
Hi there,
I've encountered an issue with RNBackgroundDownloader.directories.documents on Android:
RNBackgroundDownloader.directories.documents
, I get/storage/emulated/0/Android/data/<package_identifier>/files
.await FileSystem.getInfoAsync(RNBackgroundDownloader.directories.documents)
, I receive{"exists": false, "isDirectory": false}
.FileSystem.documentDirectory
returnsfile:///data/user/0/<package_identifier>/files/
, and this directory does exist.On iOS, the output of both
RNBackgroundDownloader.directories.documents
andFileSystem.documentDirectory
are identical.Does this mean that we cannot rely on
RNBackgroundDownloader.directories.documents
on Android?Any insights or suggestions would be greatly appreciated.
Thank you!