Cant open any file from cache
From path: /data/user/0/com.xxxx.xxxxx/cache/libCachedImageData/[any-file] dont opens. Images say that media not found, apk installer says wrong syntax. If i change to another folder, etc /sdcard/Download - it opens. But i need from cache... Android 6 emulator. result: done, ResultType.done
Or reason of it that another program (gallery or android installer) cant access this folder?
I can approve this behavior also with new version.
Same here. The following piece of code works great in Android Emulator, but not on Android Device:
final directory = await getTemporaryDirectory();
final path = directory.path;
final String urlFile = 'https://...';
await Dio()
.download(urlFile, path + '/some-file.pdf')
.whenComplete(() {
OpenFile.open(path + '/some-file.pdf');
});
Same here. The following piece of code works great in Android Emulator, but not on Android Device:
final directory = await getTemporaryDirectory(); final path = directory.path; final String urlFile = 'https://...'; await Dio() .download(urlFile, path + '/some-file.pdf') .whenComplete(() { OpenFile.open(path + '/some-file.pdf'); });
I ran your code and it worked fine on Android11
From path: /data/user/0/com.xxxx.xxxxx/cache/libCachedImageData/[any-file] dont opens. Images say that media not found, apk installer says wrong syntax. If i change to another folder, etc /sdcard/Download - it opens. But i need from cache... Android 6 emulator. result: done, ResultType.done
Or reason of it that another program (gallery or android installer) cant access this folder?
I don't think this is an available cache path, it should be like this
/Android/data/com.xxxx.xxx/cache
I have considered this problem for a moment. The intent opens a third-party app, but the third-party app does not have the permission to get the data/data/ directory of the current app. Maybe this is the reason