Tasker and share

861 views
Skip to first unread message

David Sanborn

unread,
Nov 20, 2012, 10:05:07 PM11/20/12
to tas...@googlegroups.com
Using Send Intent I have it working to the point that I can get the intent to bring up the share menu, and allow me to select what application I was to use. But my text is not coming through.

Here is what I have so far:
Send Intent
action: android.intent.action.SEND
Cat: Default
Mime Type: text/plain
Data: Testing (this is just a text word)
Extra:
Extra:
Package:
Class:
Target: Activity
If:
Continue Task After Error:
Label:

What am I missing that will allow the word 'Testing' to be passed into say twitter posting. I get the twitter post to open, but my Testing text is missing.

GermainZ

unread,
Nov 21, 2012, 2:21:51 AM11/21/12
to tas...@googlegroups.com
Is the text field focused? If not, maybe try to focus it first.

Pent

unread,
Nov 21, 2012, 3:24:03 AM11/21/12
to Tasker
According to the Android documentation you specify the text with an
Extra field.

Activity Action: Deliver some data to someone else. Who the data is
being delivered to is not specified; it is up to the receiver of this
action to ask the user where the data should be sent.

When launching a SEND intent, you should usually wrap it in a chooser
(through createChooser(Intent, CharSequence)), which will give the
proper interface for the user to pick how to send your data and allow
you to specify a prompt indicating what they are doing.

Input: getType() is the MIME type of the data being sent. get*Extra
can have either a EXTRA_TEXT or EXTRA_STREAM field, containing the
data to be sent. If using EXTRA_TEXT, the MIME type should be "text/
plain"; otherwise it should be the MIME type of the data in
EXTRA_STREAM. Use */* if the MIME type is unknown (this will only
allow senders that can handle generic data streams). If using
EXTRA_TEXT, you can also optionally supply EXTRA_HTML_TEXT for clients
to retrieve your text with HTML formatting.

As of JELLY_BEAN, the data being sent can be supplied through
setClipData(ClipData). This allows you to use
FLAG_GRANT_READ_URI_PERMISSION when sharing content: URIs and other
advanced features of ClipData. If using this approach, you still must
supply the same data through the EXTRA_TEXT or EXTRA_STREAM fields
described below for compatibility with old applications. If you don't
set a ClipData, it will be copied there for you when calling
startActivity(Intent).

Optional standard extras, which may be interpreted by some recipients
as appropriate, are: EXTRA_EMAIL, EXTRA_CC, EXTRA_BCC, EXTRA_SUBJECT.

The email intent looks like this for instance:
android.intent.extra.EMAIL:thi...@an.email.address

Pent

David Sanborn

unread,
Nov 21, 2012, 4:01:07 PM11/21/12
to tas...@googlegroups.com
Have a look at this snippet from App Inventor. It shows how to invoke the share. https://lh6.googleusercontent.com/-2etBFB_5JW4/UChRdvxzkwI/AAAAAAAAAc0/G7EH4MbipQc/s1600/sharevia.jpg

I got it to work flawlessly. So my question is in the Send Intent, where does the extra key go, and where does the extra value go. I have tried placing each in one of the extra fields, but it didnt work.

Pent

unread,
Nov 22, 2012, 2:04:38 AM11/22/12
to Tasker
> I got it to work flawlessly. So my question is in the Send Intent, where
> does the extra key go, and where does the extra value go. I have tried
> placing each in one of the extra fields, but it didnt work.

In the documentation for the Extra parameters in the Send Intent help
text it says 'colon separated key and value'.

Pent

David Sanborn

unread,
Nov 22, 2012, 9:05:27 AM11/22/12
to tas...@googlegroups.com
Thanks. Got it working now.

Pent

unread,
Nov 22, 2012, 9:17:34 AM11/22/12
to Tasker
Would be great if you could mention what you did for other interesees.

Pent

Richard Davis

unread,
Nov 22, 2012, 9:30:28 AM11/22/12
to tas...@googlegroups.com

> Would be great if you could mention what you did for other interesees.

Wow that is timing.... I was just about to start searching for this very subject... I am very interested in the final working procedure...

Thanks for any info you can provide ......  Rich

David Sanborn

unread,
Nov 24, 2012, 9:06:42 AM11/24/12
to tas...@googlegroups.com
Send Intent
action: android.intent.action.SEND
Cat: Default
Mime Type: text/plain
Data: 
Extra:android.intent.extra.TEXT: This is were the text goes that you want to share, when the intent is used.
Extra:
Package:
Class:
Target: Activity
If:
Continue Task After Error:
Label:

Sorry, I was being thoughtless about posting what I finally got to work. My apologies. 

Richard Davis

unread,
Nov 24, 2012, 10:18:00 AM11/24/12
to tas...@googlegroups.com


> Sorry, I was being thoughtless about posting what I finally got to work. My apologies. 

Not at all. Thanks for the info, I have had a lot of trouble in the past trying to get an intent I found on the internet to work in tasker, not knowing the terminology there is alot of trial and error. With help from Pent and others like yourself, I am starting to get it figured out ..    :)

This will be very useful and is much appreciated .....  Rich...

joaomgcd

unread,
Nov 25, 2012, 4:32:37 PM11/25/12
to tas...@googlegroups.com
For anyone that is interested, I've also created a Tasker plugin that does this: AutoShare
Hope you enjoy it!

David Sanborn

unread,
Nov 25, 2012, 6:30:06 PM11/25/12
to tas...@googlegroups.com
Excellent 

Richard Davis

unread,
Nov 25, 2012, 7:03:06 PM11/25/12
to tas...@googlegroups.com

> For anyone that is interested, I've also created a Tasker plugin that does this: AutoShare
> Hope you enjoy it!

That's awesome.....  I just tried it and it works great......

Not to be pushy........  but is there a chance to do the same for image.  

What I would like to be able to do is multi select pics in quick pics and then hit the share option and have those file names/paths available in tasker...

Just asking.....  :)

Thanks,  Rich.....

João Dias

unread,
Nov 26, 2012, 4:13:31 AM11/26/12
to tas...@googlegroups.com

Sure, I can look into images, you're not being pushy at all! Feature suggestions are always welcome! :)


Sent from my Galaxy S3

Richard Davis

unread,
Nov 26, 2012, 7:29:27 PM11/26/12
to tas...@googlegroups.com


> Sure, I can look into images, you're not being pushy at all! Feature suggestions are always welcome! :)

Great... Seeing how you are able to do what has been said can not be done,  a very simple plug in to allow gingerbread compatibility with the new sleek upcoming tasker should be a snap..... Yes???

Just kidding..........  :)

Thanks for considering the images,  That would be huge....

Rich.......

joaomgcd

unread,
Nov 27, 2012, 12:48:25 PM11/27/12
to tas...@googlegroups.com
I've put out an update that enables Image receiving and sharing and also a bunch of other features.

Let me know how it works! :)

Richard Davis

unread,
Nov 27, 2012, 3:02:48 PM11/27/12
to tas...@googlegroups.com

> I've put out an update that enables Image receiving and sharing and also a bunch of other features.
>
> Let me know how it works! :)

Wow your fast....

I just tried it out but I think I have a permissions problem.. I do not think it recognizes that I have purchased the full version because the text works fine but %asimage is not being set..

When i go to edit the action it will bring up your list of other apps and ask if I want to purchase. Then when i go to purchase it tells me I already own the app which I do...

Not sure where to go from here.....

Thanks,    Rich..

Richard Davis

unread,
Nov 27, 2012, 3:04:39 PM11/27/12
to tas...@googlegroups.com

I purchased yesterday if that helps.....   :)

joaomgcd

unread,
Nov 27, 2012, 5:09:41 PM11/27/12
to tas...@googlegroups.com
Hi Rich, very sorry for that! It's a bit hard testing in-app payments there must be a bug in there somewhere, but I can confirm your payment.

Can you please email me directly so we can talk properly about this?

Thanks in advance.

João Dias

unread,
Dec 11, 2012, 1:35:51 PM12/11/12
to tas...@googlegroups.com
I'll see what I can do, but I imagine it would be possible!

Thanks for the suggestion

On Tue, Dec 11, 2012 at 6:07 PM, Hubert Robert <hubert...@gmail.com> wrote:
Hi joamgcd,

would it be possible to do the same thing with all type of files ? I would like to share a file from ES explorer in order to get the path of the file.

Thanks for the great work.

And big thanks to Pent !

joaomgcd

unread,
Dec 14, 2012, 6:27:26 PM12/14/12
to tas...@googlegroups.com
Hubert, latest version now supports all file types! Look for it on Google Play in a few hours.


On Tuesday, December 11, 2012 6:07:46 PM UTC, Hubert Robert wrote:
Hi joamgcd,

would it be possible to do the same thing with all type of files ? I would like to share a file from ES explorer in order to get the path of the file.

Thanks for the great work.

And big thanks to Pent !

Le mardi 27 novembre 2012 18:48:25 UTC+1, joaomgcd a écrit :

Hubert Robert

unread,
Dec 16, 2012, 11:03:28 AM12/16/12
to tas...@googlegroups.com
Hi. Thanks a lot. It works well. Exactly what I need.
Quick and well done !

Chris Ryan

unread,
Sep 29, 2015, 9:39:54 PM9/29/15
to Tasker
I know its an old thread....... but here is a tasker task that can be used to share a file, say to google drive. It does not have permission issues and deals with the tags that the intent does not.

I have found a way to bypass the permissions and tags issue with tasker.

Instead of using a tasker intent, I have created a task which uses tasker Java functions.
These functions create a send intent and populate it with a file from the local filesystem.
It works, I have used it to share to google drive.
The link for my task is below.

Reply all
Reply to author
Forward
0 new messages