Cannot read image

Let me try to recap the “storage” situation. Kustom due to recent Google policies does not have direct storage access anymore, any access to storage is done through “scoped storage”. So specifically for the use case above there are currently 2 ways of getting images:

  • Preferred solution is using flows, you can use flows in any folder and it can pick images randomly, you can see an example here: Get a random image on click | Kustom HQ
  • The “old” way via $tu(rndimg, 1, “path”)$ will work ONLY IF images are inside Kustom managed folder, path starts with “/Kustom” and the app has access to that directory, so, for example
    • Kustom has access to your “sdcard” (emulated or not), in folder “Kustom”
    • You create a folder called “images” inside and put some stuff into it
    • You use the formula $tu(rndimg, 1, "/Kustom/images")$ (Kustom will then replace /Kustom with the right path internally using again scoper storage)
6 Likes