Best way to automatically share a screenshot to another app

317 views
Skip to first unread message

David Johnson

unread,
Dec 15, 2013, 12:38:12 AM12/15/13
to tas...@googlegroups.com
I want to automatically share a new screenshot (they get saved to /sdcard/pictures/screenshots) to another app every time a take a screenshot.

Basically, when a new image in the screenshot directory is detected, it will share that new image to another app.

What is the easiest way to accomplish this?

Side note: I have a plugin called AutoShare if that will help. I don't know how to use it.

Matt R

unread,
Dec 15, 2013, 2:01:03 AM12/15/13
to tas...@googlegroups.com
Create an event -> file -> file modified context with the directory specified (yes, you can pick a directory for a file modified event). Then in the task you'll have to do a list files action. You could probably put something in the match field to narrow things down (using the date/time which is in the filename). Maybe you could use the variable -> array process action to sort the files to get the most recent one.

Matt

David Johnson

unread,
Dec 15, 2013, 11:11:10 AM12/15/13
to tas...@googlegroups.com
How do I get it to always pick the latest/newest file and share to a specific app?

Matt R

unread,
Dec 15, 2013, 4:04:07 PM12/15/13
to tas...@googlegroups.com

David Johnson

unread,
Dec 16, 2013, 12:01:06 AM12/16/13
to tas...@googlegroups.com
I'm sorry I'm an amateur with Tasker.

Can you tell me exactly what I need to do?

Goal: when screenshot is taken, auto share to another app.

David Johnson

unread,
Dec 16, 2013, 12:04:07 AM12/16/13
to tas...@googlegroups.com
All I got so far is a task that is monitoring the screenshot directory for changes. From there, I have no idea how to get Tasker to select the newest file and share it to another app.

Matt R

unread,
Dec 16, 2013, 12:41:25 AM12/16/13
to tas...@googlegroups.com
If what I wrote seems entirely nonsensical, start with the beginner guides linked on the Tasker website. You'll need a list files action. The user guide says it lists the files alphabetically, so if you're lucky it will be in the last entry of the array generated from the list files action. It might not though depending on how the file names are formatted on your device. If not, you can use misc -> test, file modified and loop through the whole array with a for loop comparing the result to find the newest.

Matt

Marta Hintz

unread,
Dec 17, 2013, 7:12:40 PM12/17/13
to tas...@googlegroups.com
also, helps to google this forum.  There rarely is a question posted here that hasn't already been answered a few times. 
Save Pictures To Different Folder / Camera Click Context
https://groups.google.com/forum/#!searchin/tasker/COPY$20PICTURE/tasker/40YbfbPZ96c/IqDL4UKUTZoJ

I just did a quick search and brought up this.  This is basically the same thing that Matt R has suggested.  I would also reccomend to do some reading as he stated.  It will help you understand how to copy and move files.   

People will help you here more if you actually attempted to find and then create something.  I don't think the tasker gurus have time to spoon feed everyone.  They help a lot!       :-)
Reply all
Reply to author
Forward
0 new messages