Intent for sending a picture to whatsapp

1,274 views
Skip to first unread message

francwalter

unread,
Sep 30, 2015, 4:51:03 PM9/30/15
to Tasker
Hello

I don't find any information about the right intent to send a photo to whatsapp.
I want to take a picture with tasker (in the media actions) and send the file right away to whatsapp (share), where I can send it then to somebody.

I know that there is this included whatsapp camera to do this, but with this camera I cannot define the resolution of the photo and whatsapp produces big data, each image is about 3 to 5 mb.

What is the exact intent to use?
I asked this before in the xda forum but no answer:
http://forum.xda-developers.com/showpost.php?p=63065980&postcount=176

Thank
Frank

Scott

unread,
Sep 30, 2015, 5:16:33 PM9/30/15
to Tasker
I don't use Whatsapp, but if you can share pictures to Whatsapp from other apps then AutoShare should be able to do what you want.  It's a pretty handy plugin beyond that as well.

francwalter

unread,
Oct 1, 2015, 2:56:41 AM10/1/15
to Tasker
Am Mittwoch, 30. September 2015 23:16:33 UTC+2 schrieb Scott:
I don't use Whatsapp, but if you can share pictures to Whatsapp from other apps then AutoShare should be able to do what you want.  It's a pretty handy plugin beyond that as well.

Yes, this works. I bought the AutoShare App and use the Tasker Plugin now.

But I wonder if it were not possible to do this natively. I tried a lot (with Intent Intercept etc.) but always it says that it cannot be shared.

Jeffrey Eng

unread,
Oct 9, 2015, 11:27:20 AM10/9/15
to Tasker
Not sure if this is what you're looking for, but maybe try this?
https://www.reddit.com/r/tasker/comments/3mwtwi/using_the_share_intent_to_send_a_file_no_root/

Juergen Gruen

unread,
Oct 9, 2015, 11:35:39 AM10/9/15
to Tasker
This was discussed also here in the group today. Solution by  Odysseos...
https://groups.google.com/d/msg/tasker/wpWG8eA05ug/wV0QAEbPBQAJ


Juergen.

Rich D

unread,
Oct 9, 2015, 11:37:30 AM10/9/15
to Tasker Google Groups Post


> Not sure if this is what you're looking for, but maybe try this?
> https://www.reddit.com/r/tasker/comments/3mwtwi/using_the_share_intent_to_send_a_file_no_root/
>

I copied this from the tasker forum.  It could be the same approach

Tasker share pics and files

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 ]
▶ Show quoted text
▶ Show quoted text
▶ Show quoted text
You are welcome ;)

▶ Show quoted text

francwalter

unread,
Oct 9, 2015, 12:40:10 PM10/9/15
to Tasker
Am Freitag, 9. Oktober 2015 17:37:30 UTC+2 schrieb Rich D:


I copied this from the tasker forum.  It could be the same approach

Tasker share pics and files

Hi Zio Tempa.  ...


Thank. I think you mean exactly this:


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 ]

 
and @joaomgcd: as the seller of AutoShare (?) could you specify what to do exactly? I think you must know it and as this is no platform to sell products but give help to tasker, would it be nice to autoshare your knowledge a bit ;)

 
Reply all
Reply to author
Forward
0 new messages