How can I get URI
from a file with a dynamic folder in the path?
java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/emulated/0/AppName/155522864927/media/1555228649276.mp4
It works fine only if I set hardcoded path
<external-path name="/" path="AppName/155522864927/media/" />
The path cannot be random. You need to configure the path that you expose. For more info please have a look here.