Issue
How do I make like this
When the user clicks to save the file an intent will get activated and tell the user where he wants to save that file
Solution
There is Storage Access Framework to do exactly this. There is a pretty good description in the Official documentation, so I just provide the simplest sample right here:
const val CREATE_FILE = 1
val intent = Intent(Intent.ACTION_CREATE_DOCUMENT).apply {
addCategory(Intent.CATEGORY_OPENABLE)
}
startActivityForResult(intent, CREATE_FILE)
Answered By - S-Sh
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.