Simpletask supports a couple of intents which can be used by other applications (e.g. tasker) to create tasks or display lists.
To create a task in the background, so without showing simpletask, you can use the intent:
the intent will have one extra string task which contains the task to be added.
For example to create a task from tasker use the following action:
I like to add the +tasker tag to be able to quickly filter tasks that were created by tasker.
To open Simpletask with a specific filter you can use the intent:
Name | Type | Description |
---|---|---|
CONTEXTS | String | list of lists in filter separated by 'n' or ',' |
PROJECTS | String | list of tags in filter separated by 'n' or ',' |
PRIORITIES | String | list of priorities in filter separated by 'n' or ', |
CONTEXTSnot | Boolean | true to invert the lists filter |
PROJECTSnot | Boolean | true to invert the tags filter |
PRIORITIESnot | Boolean | true to invert the priorities filter |
HIDECOMPLETED | Boolean | true to hide completed tasks |
HIDEFUTURE | Boolean | true to hide tasks with a threshold date |
SORTS | String | active sort (see below) |
SORTS contains a comma or '' separated list of sort keys and their direction with a ! in between. Giving <direction>!<sort key>.
See list in http://mpcjanssen.nl/fossil/simpletask/artifact/ac6b9bf579b8d1a9c23083031852a0fdd81efb75?ln=42-51
Due to limitations in Tasker you can only add 2 extras. So instead you can use the am shell command. For example:
am start -a nl.mpcjanssen.simpletask.START_WITH_FILTER -e SORTS +!completed,+!alphabetical -e PROJECTS project1,project2 -e CONTEXTS @errands,@computer --ez CONTEXTSnot true -c android.intent.category.DEFAULT -S
The -S at the end will ensure the app is properly restarted if it's already visible. However with tasker the -S seems not to work. So there try it without.