Need help with intent for quickpics

878 views
Skip to first unread message

Richard Davis

unread,
Dec 15, 2012, 12:34:39 AM12/15/12
to tas...@googlegroups.com

I have been trying for a long time to figure this out but I am still lost. I would like to send a intent to view a folder with quickpics .  I tried emailing the developer but did not receive much help. He did indicate it should be possible .. I included the manifest and a log cat entry and would very much appreciate some help in putting this into a tasker intent...

I/ActivityManager(  519): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.alensw.PicFolder/.GalleryActivity bnds= #a [234,413][423,538] } from pid 3119
I/ActivityManager(  519): Displayed com.alensw.PicFolder/.GalleryActivity: +202ms

com.alensw.PicFolder.txt

Richard Davis

unread,
Dec 16, 2012, 12:36:52 AM12/16/12
to tas...@googlegroups.com

Here is what i have so far and of course this does not work. I think i have all the pieces to the puzzle I just can't seem to put it together. I put a section of the manifest (the entire manifest is attached above)  below with the log intent.  If someone could post some advice I would really appreciate it.... thanks,      Rich...

Action:android.intent.action.MAIN

Cat:Launcher

Mime type:

Data:

Extra:

Extra:

Package:com.alensw.PicFolder

Class:.GalleryActivity

Target:Activity






LOG------------------------



I/ActivityManager(  519): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.alensw.PicFolder/.GalleryActivity bnds= #a [234,413][423,538] } from pid 3119
I/ActivityManager(  519): Displayed com.alensw.PicFolder/.GalleryActivity: +202ms

MANIFEST --------------------------------

<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="101"
android:versionName="2.7.1"
android:installLocation="auto"
package="com.alensw.PicFolder">
<uses-sdk
android:minSdkVersion="5"
android:targetSdkVersion="16"/>
<uses-permission
android:name="android.permission.SET_WALLPAPER"/>
<uses-permission
android:name="android.permission.WAKE_LOCK"/>
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission
android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
<application
android:label="@2131230720"
android:icon="@2130837523"
android:name=".QuickApp">
<activity
android:label="@2131230720"
android:name=".GalleryActivity"
android:taskAffinity="android.task.pictures"
android:configChanges="keyboardHidden|orientation|screenSize">
<intent-filter>
<action
android:name="android.intent.action.MAIN"/>
<category
android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action
android:name="android.intent.action.GET_CONTENT"/>
<category
android:name="android.intent.category.OPENABLE"/>
<category
android:name="android.intent.category.DEFAULT"/>
<data
android:mimeType="image/*"/>
<data
android:mimeType="video/*"/>
<data
android:mimeType="vnd.android.cursor.dir/image"/>
</intent-filter>
<intent-filter>
<action
android:name="android.intent.action.PICK"/>
<category
android:name="android.intent.category.DEFAULT"/>
<data
android:mimeType="image/*"/>
<data
android:mime

Richard Davis

unread,
Dec 22, 2012, 11:11:50 AM12/22/12
to tas...@googlegroups.com

No help.....  ??   :(
Do I need more info ??
Am I even close.....  ??

Any info would be greatly appreciated ......

Thanks,   Rich..

Kopmestikirt

unread,
Dec 22, 2012, 1:12:04 PM12/22/12
to tas...@googlegroups.com
I got it working with the following intent using Intent Tools and Intent Intercept:

(opening temp folder on SD-Card)
Action: android.intent.action.VIEW
Category: android.intent.category.LAUNCHER
Data: file:///storage/sdcard0/temp
Component Name: com.alensw.PicFolder
Component CLS: com.alensw.PicFolder.GalleryActivity
Flags: NEW_TASK, RESET_TASK_IF_NEEDED -> 0x10200000 (probably not even neccessary)

I will now try to port this to tasker. You'll hear from me again in case of success.

Kopmestikirt

unread,
Dec 22, 2012, 1:17:13 PM12/22/12
to tas...@googlegroups.com
So here is the intent for tasker:
Action: android.intent.action.VIEW
Cat: Launcher
Mime: 
Data: file:///storage/sdcard0/temp
Extra:
Extra:
Package: com.alensw.PicFolder
Class: com.alensw.PicFolder.GalleryActivity
Target: Activity

Have fun :)

Richard Davis

unread,
Dec 22, 2012, 1:44:34 PM12/22/12
to tas...@googlegroups.com

WOW....  thanks alot....

I will not say how long I have been trying to get this... but was a while..

It was the class that had me----

Class: com.alensw.PicFolder.GalleryActivity

>> I got it working with the following intent using Intent Tools and Intent Intercept:

Where can I find these tools if you don't mind my asking??

Thanks again... Rich..

Richard Davis

unread,
Dec 22, 2012, 1:47:43 PM12/22/12
to tas...@googlegroups.com

Oh... one more thing.. where would I put the flag in tasker if i was to use it..

Kopmestikirt

unread,
Dec 22, 2012, 2:23:39 PM12/22/12
to tas...@googlegroups.com
Intent Intercept is a simple tool that tries to catch most of the "open with" actions on your phone.
Intent Tools can send intents (unfortunately it simply crashes when you entered something invalid) but I use it because it has a very awesome autocomplete feature.
Both apps can be found for free in the play store.

Kopmestikirt

unread,
Dec 22, 2012, 2:25:39 PM12/22/12
to tas...@googlegroups.com
I think you would need to put 
flg=0x10200000 
into one of the "extra" fields.

You can use the App Intent Tools to calculate the right value for your flags.

Richard Davis

unread,
Dec 22, 2012, 2:27:50 PM12/22/12
to tas...@googlegroups.com

Thanks for all the great info..... very very much appreciated .... :)

Kopmestikirt

unread,
Dec 22, 2012, 3:58:58 PM12/22/12
to tas...@googlegroups.com
Come back if you have further questions :)
Merry christmas, Rich!

Richard Davis

unread,
Dec 22, 2012, 4:22:18 PM12/22/12
to tas...@googlegroups.com

> Come back if you have further questions :)

Oh you should not have said that.....    :)  (just kidding)

However...
There is one more thing you may be able to help with.. The reason i needed the intent was - tasker does a fine job of opening quick pics and sending the data, it will open quickpics to a specified folder. However if i use the back button while in quickpics and leave the app (home button) while I am in its folder browser screen the next time I open it with the same tasker action it will open to the folder browser screen and not the pre selected folder..
I emailed the developer and he said--

" You may need set the clear top flag (or some other flag) to the intent, please check the docs of the intent."

I just tried the clear top flag in the manor you recommended and it did not work..

Just thought you might be able to recommend a few flags to try ....

> Merry christmas, Rich!

Thank you.. and a very merry Christmas to you as well...  

Kopmestikirt

unread,
Dec 22, 2012, 4:43:10 PM12/22/12
to tas...@googlegroups.com
I've just reproduced said problem. 
To reset the task I used the following flags:
NEW_TASK
CLEAR_TOP
RESET_TASK_IF_NEEDED
CLEAR_WHEN_TASK_RESET
-> 0x14280000

This works fine using intent tools but putting "flg=..." in the extra field doesn't seem to have any effect at all.

Hmm... unfortunately I think Pent is quite busy during christmas. Maybe he can say how to use flags.

But.. I'll roll a joint and see if I can find out some more with catlog :)

Richard Davis

unread,
Dec 22, 2012, 5:13:58 PM12/22/12
to tas...@googlegroups.com

Wow... your fast...  thanks for checking it out, this is a huge help...

Kopmestikirt

unread,
Dec 22, 2012, 5:21:45 PM12/22/12
to tas...@googlegroups.com
Okay. @Pent please make it possible to send out flags using the send intent tool!

Meanwhile here's a workaround for you:
New Action -> Script -> Run Shell

Command:
am start -a android.intent.action.VIEW -d file:///storage/sdcard0/PUTYOURFOLDERHERE -c android.intent.category.LAUNCHER -n com.alensw.PicFolder/com.alensw.PicFolder.GalleryActivity -f 0x14000000
(yes, ONE huge line :))

Only the flags
NEW_TASK
CLEAR_TOP
were actually needed, thus Flags = 0x14000000

Richard Davis

unread,
Dec 22, 2012, 5:32:46 PM12/22/12
to tas...@googlegroups.com

That's fantastic ... I will take this as a early Christmas present....

One more small thing..
I have not used shell as of yet..

I do not need root for this, correct? ?

How do use a tasker variable for PUTYOURFOLDERHERE??

Well I guess that's two....   :) 

Thanks again ... Rich

Kopmestikirt

unread,
Dec 22, 2012, 5:45:54 PM12/22/12
to tas...@googlegroups.com


Am Samstag, 22. Dezember 2012 23:32:46 UTC+1 schrieb Rich:

That's fantastic ... I will take this as a early Christmas present....

One more small thing..
I have not used shell as of yet..

I do not need root for this, correct? ?

Nope. I didn't tick the "use root" checkbox but it apparently works without :)
 

How do use a tasker variable for PUTYOURFOLDERHERE??

Set up a variable e.g. %PICFOLDERTEMP = temp
Then the command  
am start -a android.intent.action.VIEW -d file:///storage/sdcard0/%PICFOLDERTEMP -c android.intent.category.LAUNCHER -n com.alensw.PicFolder/com.alensw.PicFolder.GalleryActivity -f 0x14000000
will open the folder "temp" on your SD card.

Richard Davis

unread,
Dec 22, 2012, 5:58:07 PM12/22/12
to tas...@googlegroups.com

Great...

Thanks for the 2 stocking suffers.....  you have definitely made it a merry Christmas ....  hope yours is the same.....   Rich..

Kopmestikirt

unread,
Dec 22, 2012, 6:03:55 PM12/22/12
to tas...@googlegroups.com
You're welcome, buddy! Thank you very much. Christmas will be awesome hopefully!
~Kop

Richard Davis

unread,
Dec 22, 2012, 8:15:05 PM12/22/12
to tas...@googlegroups.com

Just got a chance to give it a test. Seems to work great with one small problem.

The shell command does not seem to allow spaces in the folder name. Is there a extra command I can use for this to allow spaces in the folder name?

Thanks,  Rich..

Richard Davis

unread,
Dec 22, 2012, 8:29:47 PM12/22/12
to tas...@googlegroups.com

> Just got a chance to give it a test. Seems to work great with one small problem.
>
> The shell command does not seem to allow spaces in the folder name. Is there a extra command I can use for this to allow spaces in the folder name?

Ahhh, never mind.. just found on google, needed the folder name in double quotes ....

>
> Thanks,  Rich..

Saad Thahim

unread,
May 9, 2015, 11:12:48 AM5/9/15
to tas...@googlegroups.com
I was looking for this thing, and found the thread, any ways i'm not getting how to do this in tasker, i mean you have component name, cls, and also flags, where should i write these in tasker?

Rich D

unread,
May 9, 2015, 11:35:19 AM5/9/15
to Tasker Google Groups Post


>
> I was looking for this thing, and found the thread, any ways i'm not getting how to do this in tasker, i mean you have component name, cls, and also flags, where should i write these in tasker?

It is used in a shell command.  Action/ code / run shell

Here is the one I am still using..

A38: Run Shell [ Command: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 Timeout (Seconds):31 Use Root:Off Store Output In: Store Errors In: Store Result In: ]

Reply all
Reply to author
Forward
0 new messages