英文:
Download an email attachment file to a custom folder in Android external storage
问题
在我的应用中,我已经在外部存储中创建了一个父文件夹,其中包含以当前用户的 userId 命名的子文件夹。
如何在编程上将电子邮件文件附件的下载定向到其中一个文件夹?是否有将这些文件夹添加到共享选项表的方法?
我希望能够在电子邮件客户端应用中打开带有附件的电子邮件,并将附件直接下载到其中一个文件夹。目前我唯一能想到的方法是先将文件下载到下载文件夹,然后再将文件复制到我的自定义文件夹。
但是,是否有任何方法可以直接将附件文件下载到我的自定义文件夹呢?
英文:
In my app I've created a parent folder in external storage with child folders inside named after the current user's userId.
How would I programmatically direct email file attachment downloads to one of these folders? Is there a way to add these folders to the Share Sheet?
I want to be able to open an email with an attachment in an email client app and download the attachment directly to one of these folders. The only way I can see how to do it now would download the file to downloads and then copy the file to my custom folder.
But, is there any way I can directly download the attachment file to my custom folder?
专注分享java语言的经验与见解,让所有开发者获益!
评论