I created an application the way you explained.
Sanket Bhounsule
2

This is the problem with dynamic permissions on newer versions of Android. You need to provide runtime permission for android for storage. You can do it by going to app setting and then providing storage permission from there.

Like what you read? Give Rajesh Narwal RJ a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.