Copy a text file and an image from assets to shared storage (→ Android 10+)

Note:
I imported the same app with → AI2 and built 2 APKs:

  1. Designer: DefaultFileScope = Shared
  2. Designer: DefaultFileScope = Legacy

Tested on a Pixel 2XL (Android 11):
The first one doesn’t work at all, regardless of whether or not READ permission has been granted.
The second works only if READ permission has been granted.