Share action on a file
Moderator: Martin
Share action on a file
So how do I do an action on a file that would be to open share/send menu? Like if you are in any file manager app and you select a file and click share button then share menu appears where you can send it to some other app or whatever. What I want to do is to watch a directory for a new file creation and when it is created I want to have a notification in notifcation tray and one of the actions would be to share that file that has been created and I want it to open that share menu and click whatever I want to share that file to. I know how to do everything but opening that share menu with the just newly created file as a query for the share menu. Any help?
Re: Share action on a file
Hi,
You can use the action Start Activity to do this. The example Compose Mail with Attachment available when editing the action should work. You can remove the subject, text and the mail addresses in the extra fields and just keep the STREAM. You have to create an uri from your file, prepending file:// to the absolute file path should work in most cases.
Regards,
Martin
You can use the action Start Activity to do this. The example Compose Mail with Attachment available when editing the action should work. You can remove the subject, text and the mail addresses in the extra fields and just keep the STREAM. You have to create an uri from your file, prepending file:// to the absolute file path should work in most cases.
Regards,
Martin