Tasker error with QuickPic and Send Intent.

73 views
Skip to first unread message

Logan Fury

unread,
Feb 28, 2017, 9:25:18 AM2/28/17
to Tasker
Hello,

Ive got two seperate tasks that use Send Intent to launch QuickPick to two seperate animated .gifs.

first is:

Ani QuickPic (147)
A1: Variable Set [ Name:%files(%rand) To:Download/iPhone Wallpapers/agiGrnFRAME.png Recurse Variables:Off Do Maths:Off Append:Off ] 
A2: Show Scene [ Name:Random Image Display As:Overlay, Blocking, Full Window Horizontal Position:100 Vertical Position:100 Animation:System Show Exit Button:On Show Over Keyguard:On Continue Task Immediately:On ] 
A3: Variable Set [ Name:%path To:file:///sdcard/agi.gif Recurse Variables:Off Do Maths:Off Append:Off ] 
A4: Send Intent [ Action:android.intent.action.VIEW Cat:Default Mime Type:image/* Data:%path Extra: Extra: Extra: Package:com.alensw.PicFolder Class: Target:Activity ]

second is:

Ani QuickPic Silent (154)
A1: Variable Set [ Name:%files(%rand) To:Download/iPhone Wallpapers/Wht overlay.png Recurse Variables:Off Do Maths:Off Append:Off ] 
A2: Show Scene [ Name:Random Image Display As:Overlay, Blocking, Full Window Horizontal Position:100 Vertical Position:100 Animation:System Show Exit Button:On Show Over Keyguard:On Continue Task Immediately:On ] 
A3: Variable Set [ Name:%path To:file:///storage/extSdCard/media/ch.gif Recurse Variables:Off Do Maths:Off Append:Off ] 
A4: Send Intent [ Action:android.intent.action.VIEW Cat:Default Mime Type:image/* Data:%path Extra: Extra: Extra: Package:com.alensw.PicFolder Class: Target:Activity ]

Issue is that if I run one Task, then run the other, it doesnt present the image in the code, it shows the animated .gif from the previous Task.

Is there an additional line of code I can include in these two Tasks that would make QuickPic "forget" what it was last told and obey the running tasks %path variable?

Thank you for reading,

Logan

Rich D

unread,
Feb 28, 2017, 6:25:28 PM2/28/17
to Tasker Google Groups Post
Is there an additional line of code I can include in these two Tasks that would make QuickPic "forget" what it was last told and obey the running tasks %path variable?


The state of a app when  opened by an intent is controlled by 'flags'. Taskers send intent action does  not allow  these flags.  For more info on the subject you can google 'tasker rich d flags'. 

As always you have several options. 

1. Not so elegant.. you can try using the tasker 'launch app' action with the 'always start new copy' option checked just before your  intent action. You might even  be able to just put your %path in the data field of the launch app action, I doubt that will work but it might be worth a try.

2. bald apps and auto apps both have intent actions that allow flags.

3. I had the same issue with a quickpic intent when i wanted to view a folder of pics. I solved it with a shell action.  This is the actual command I put in the shell action, this will open a folder   of pics for viewing. You should be able to convert this for your needs. I do not have time just now but will see if I can get it working with a gif later..

am start -a android.intent.action.MAIN -d "file:///%picfilename" -c android.intent.category.LAUNCHER -n com.alensw.PicFolder/com.alensw.PicFolder.GalleryActivity --user 0 --activity-clear-task --activity-clear-top


 The flags are


 --activity-clear-task --activity-clear-top

Logan Fury

unread,
Feb 28, 2017, 7:22:49 PM2/28/17
to tas...@googlegroups.com
Hello Rich,

I added option 3 as an extra action in the task that was showing the other tasks .gif, and its now immediately working properly, I can alternate the two tasks and get correct display every time.

Thank you very very much for a perfect solution.

Sincerely,

Logan

--
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/-XTEqXDEvx4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

Logan Fury

unread,
Feb 28, 2017, 7:26:50 PM2/28/17
to tas...@googlegroups.com
Hello Rich,

Thank you very much for the reply. I have used your option 3 as a single action to replace my two existing actions of Variable Set and Send Intent, in just one of the two problem tasks, and now BOTH of them are firing perfectly every time and displaying the correct .gif image.

This fixed and streamlined my Task and solved my problem completely. I cant thank you enough for your time.

Sincerely,

Logan

On Tue, Feb 28, 2017 at 3:24 PM, Rich D <ricp...@gmail.com> wrote:

--

Rich D

unread,
Feb 28, 2017, 8:03:55 PM2/28/17
to Tasker Google Groups Post

This fixed and streamlined my Task and solved my problem completely. I cant thank you enough for your time.


NP..

Good to hear you figured it out... 

Reply all
Reply to author
Forward
0 new messages