mhoeher / opentodolist

A simple Todo and task management application - Mirror of https://gitlab.com/rpdev/opentodolist
https://opentodolist.rpdev.net
GNU General Public License v3.0
161 stars 12 forks source link

ANDROID - Cannot Open a Folder as a Library #86

Closed LinuxAndCoffee closed 5 months ago

LinuxAndCoffee commented 1 year ago

Not sure what I am doing wrong, but when I try to "Open a Folder as a Library" and tap on the SELECT button, I start in the cache folder and tap the UP arrow on the upper left corner. But once I do that, the UP arrow disappears and I cannot navigate any further up. I store my Libraries in the Documents folder normally, not in the /net.rpdev.opentodolist/files/Libraries because I use Syncthing with my Linux desktop. Please let me know if there is more information I can provide, or if I am just missing something obvious. Thank you for this awesome app!

mhoeher commented 1 year ago

I guess this is due to the file access model. In earlier days, Android allowed apps to freely use the file system (they just had to declare an appropriate permission). In more recent versions of the system, this has been removed in favour of a more controlled way to access files and folders outside the app itself.

So, what does this mean for you?

  1. The behaviour you see is normal. OpenTodoList can only access the files in its own "sandbox". The said "cache" folder is something like a local standard directory for anything the app needs to store. So, you can create a dedicated folder within the app sandbox to store your libraries. But:
  2. OpenTodoList cannot store libraries outside the described sandbox. While this - technically - could be solved, somehow, it would mean a lot of effort and would only be applicable to Android. So this is nothing that would come anytime soon (if ever).

So how could you proceed here? I think, some apps (Syncthing - as far as I remember - belonging to them) implement access to all files via the new APIs. So while OpenTodoList cannot store its libraries outside its own "scoped" access, you could still create a library in a folder and then let Syncthing sync this folder with whatever upstream you like.

Hope this helps a bit! If you have any further questions about this topic, please let me know.