Enable the use of strings when ActivityStarter extra requires a Uri argument

For example, an ActivityStarter Action android.intent.action.SEND would be able to include a file in the send if the file name value paired with the android.intent.extra.STREAM key becomes a Uri object somewhere in StartActivity (or maybe before). This is apparently how Sharing ShareFileWithMessage works. Not having this translation limits the use of ActivityStarter.

If sending an email, you may consider some other method?

I could but I am looking for an approach that is more general and could apply to other actions.

And you can't use the Sharing component because....?

I did actually create a small extension that provides for sending an attachment with Gmail:

uk.co.metricrat.sendmailattach.aix (4.7 KB)


You may want to develop on from there....

1 Like

The problem I have with the Sharing component is that the user can peg themselves to an app by selecting Always. Not a catastrophe, but undoing the app pegging requires the user to go through system settings they don't usually have to deal with. It seems to me that a general approach would give the developer finer control over which app is used by tying apps to a palette of buttons (by way of Activity Class and Package). Or, that's what I would be trying. Maybe there is a way I am missing? Also, with ActivityStarter, I have the chance to know the disposition of the outcome of the activity.

The extension approach seems a bit ad hoc. Certainly workable and a good thing to have available, but I would rather move the behavior into the underlying system in some general way. The counter to putting the behavior in the system of course leads to questions about priority. Thanks for this!

MIT are aware of this, but it will be on a very long list (somewhere near the bottom) of things to do....

Also have a look at @Taifun 's Sharing extension, which gives more control over the app selection

Which thing specifically?

What?! Some where near the bottom!? Blimey! :wink:

Makes complete sense. Many thanks for your outstanding help. I'll take a look at your Sharing extension.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.