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

Post your questions and help other users.

Moderator: Martin

Post Reply
voigas
Posts: 1
Joined: 28 Nov 2019 21:33

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

Post by voigas » 29 Nov 2019 09:35

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

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

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

Post by Desmanto » 01 Dec 2019 18:20

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.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply