Page 1 of 1

Trigger email with attachment (Start Activity android.intent.action.SEND)

Posted: 29 Nov 2019 09:35
by voigas
Hi,

i have a workflow to take a picture and then send the picture as attachment via mail.
I implemented the mail stuff via "Start Activity" action "android.intent.action.SEND". I put the picture in Extras

Code: Select all

putUri("android.intent.extra.STREAM", "file://{picure_path}");
This was working as expected.

Since the last upgrade of my mail app (K9 mail), this is not working any more. I tried another mail app (FairEmail). FairEmail told me that "An outdated app sent a file path instead of a file stream". According to their FAQ, modern apps should not have direct access to file system any more. I think that is the issue here
I think the android developer reference references this.

Do you know anything about how to get a file stream for a given file and use this in the intent instead in Automagic?


Regards
voigas

Re: Trigger email with attachment (Start Activity android.intent.action.SEND)

Posted: 01 Dec 2019 18:20
by Desmanto
Can you try MiXplorer from xda? MiXplorer send content uri including the path too. Try to share a file from MiXplorer to K9 Mail and see if it get thru without error. If MiXplorer is working, then K9 mail only accept content uri version then. As I know Automagic doesn't have the content provider for it. Maybe we can try to pass the file thru Mixplorer instead.