Closed simonpoole1 closed 3 years ago
Quite possibly it is -- i noticed a similar bug report on OsmAnd this morning.
I'm currently working on updating the file access to the storage access framework which should fix this, though i'm just in a phase of abstracting the current file access into one place at the moment.
Does fadd29ea6d2f18e82e327dd95b351059c99a3ba3 work for you for now?
You might want to try out the current file-access branch. It's still experimental at the moment as it's a big overhaul in how files are managed -- so backup your crosswords first. It's been working ok for a couple of days for me, but i haven't tried Android 11.
By default it now stores/looks for files in the app internal storage. To use the traditional "crosswords" folder instead, go to settings, select external storage, and select the crosswords folder.
This appears to work well for me, even on Android 11. It's now on master so i'm closing this.
Note: Android 11 file access is slow (at least on LineageOS 18.1 for me). As far as i know i'm using the SAF properly (i.e. not naive use of DocumentFile). I have a plan to optimise the browse list population to try and improve things for large collections -- currently it reads the meta file for every puzzle in the list, which isn't ideal. This should halve the load time according to my experiments.
Since pulling recent changes, crossword data isn't being written to external storage. This is affecting download of new crosswords and saving of game state.
Checking File.canRead()/canWrite() on
/storage/emulated/0/crosswords
shows that it is not writeable. (Although/storage/emulated/0/crosswords/temp
is present and claims to be writeable).I'm wondering if this is related to [getExternalStorageDirectory() being deprecated](https://developer.android.com/reference/android/os/Environment#getExternalStorageDirectory()). I'm running Android 11 on my phone and in my emulator - haven't tried yet on older versions.