Intent to share image

644 views
Skip to first unread message

ZioTempa

unread,
Oct 8, 2015, 2:50:15 AM10/8/15
to Tasker
Hi all, I wanted to start an intent to share an image. So first I got a little program called Intent Intercept. Then I got to this site and modified the program to share the image:https://m.reddit.com/r/tasker/comments/3mwtwi/using_the_share_intent_to_send_a_file_no_root/
So now my task, if launched and intercepted by the intent intercept program, produces exactly the same content as if I shared the file from a file manager. Problem is that it doesn't really pass the stream. So for example whatsapp stops and says that share has failed, while Gmail opens a new mail with the name of the image as the subject but there's no image in the body. Running logs on Tasker gives no result, I mean no errors. Can you help me on this?
Thanks
Vinz

joaomgcd

unread,
Oct 8, 2015, 4:52:39 AM10/8/15
to Tasker
You can use AutoShare (even the free version) to easily do this :)

Odysseos

unread,
Oct 9, 2015, 1:43:03 AM10/9/15
to Tasker
Hi Zio Tempa. I use the code below for a long time now and i have never had a fail. Basically, I use it to share images via Dropbox or Whatsapp and it works fine.
In A4 action you can leave blank the package field (in this way a "select app" page will be shown), or fill it with the package name of the app you like ( e.g. com.android.dropbox for Dropbox or com.whatsapp for WhatsApp).

Image Send Via Intent (45)
 
A1: Variable Set [ Name:%path To:/sdcard/DCIM/Camera/IMG_myimagename.jpg Do Maths:Off Append:Off ]
 
A2
: Java Function [ Return:file Class Or Object:File Function:new
{File} (String) Param:%path Param: Param: Param: Param: Param: Param: ]
 
A3
: Java Function [ Return:uri Class Or Object:Uri Function:fromFile
{Uri} (File) Param:file Param: Param: Param: Param: Param: Param: ]
 
A4
: Send Intent [ Action:android.intent.action.SEND Cat:None Mime Type:image/* Data: Extra:android.intent.extra.STREAM: uri Extra: Extra: Package: Class: Target:Activity ]

Vincenzo Giambusso

unread,
Oct 9, 2015, 3:33:09 AM10/9/15
to tas...@googlegroups.com
so damn easy!!!! Thanks a lot!!!

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/wpWG8eA05ug/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.



--
Vincenzo Giambusso

Ludovico D'Argenio

unread,
Oct 9, 2015, 3:37:18 AM10/9/15
to tas...@googlegroups.com

You are welcome ;)

Reply all
Reply to author
Forward
0 new messages