Basic custom widget to display tasks from calendar

Share and discuss your flows and ideas with other users.

Moderator: Martin

Post Reply
lueq
Posts: 25
Joined: 06 Feb 2016 00:15

Basic custom widget to display tasks from calendar

Post by lueq » 20 Feb 2016 19:28

This is a very basic custom widget that displays tasks from the stock calendar app on my Samsung S5 with Lollipop 5.1.1.
I could not find any widget that displayed tasks (while there are plenty of widgets that display appointments). It seems that tasks are not exposed in any content provider, so they are harder to get to, and it requires root.

This is how the widget looks:
widget_TasksCW_screenshot_small.png
widget_TasksCW_screenshot_small.png (40.94 KiB) Viewed 16584 times
PREREQUISITES:
:!: Rooted device
:!: sqlite3 - I copied the version that comes with Titanium Backup (/data/data/com.keramidas.TitaniumBackup/files) to the /system/xbin folder and made it executable.
:?: I am not sure whether the calendar app is Samsung specific. I also read that the app was changed between different Android versions. This version of the app came with 5.1.1 Lollipop and contains both appointments and tasks, and both can be synced from Outlook on a PC with the appropriate software (e.g. AkrutoSync).

INSTRUCTIONS:
Install both the flow and the widget, adjust settings as desired, and activate flow.
The flow has an activity "TasksCW Flow Settings" that allows you to adjust a couple of settings conveniently.

NOTES:
The screenshot shows a little refresh icon in the top right corner of the widget. This icon is not included in this post as I don't own the copyright to it. It is also not essential. It is just a reminder for me that touching the heading area of the widget refreshes the displayed tasks. Touching the task list opens the calendar app.
Attachments
widget_TasksCW_v1.0.xml
Task Display Custom Widget
(8.29 KiB) Downloaded 947 times
flow_TasksCW_v1.0.xml
Task Display Flow for Custom Widget
(5.58 KiB) Downloaded 916 times

eggger
Posts: 13
Joined: 16 May 2013 15:19

Re: Basic custom widget to display tasks from calendar

Post by eggger » 22 Feb 2016 08:00

beautiful flow and a good idea


I think you could use "Query Content Provider" action .

Anyway I think you using Sumsung calendar app because I get "Tasks" table doesn't exist

lueq
Posts: 25
Joined: 06 Feb 2016 00:15

Re: Basic custom widget to display tasks from calendar

Post by lueq » 22 Feb 2016 20:38

Thanks for the feedback.

I tried to use "Query Content Provider", but there isn't one documented for tasks and my guesses for an undocumented one failed.

And your experience confirms that the calendar app is most likely Samsung specific. It should be easy to check whether a calendar app supports tasks - in that case you should be able to create a new task within the app.

Linuxmel
Posts: 21
Joined: 21 Dec 2015 00:16

Re: Basic custom widget to display tasks from calendar

Post by Linuxmel » 24 Feb 2016 07:47

Why does it require root? Nice work.

lueq
Posts: 25
Joined: 06 Feb 2016 00:15

Re: Basic custom widget to display tasks from calendar

Post by lueq » 24 Feb 2016 13:22

It requires root because Android does not provide an official way to read the tasks from the calendar app - at least I couldn't find one. And it does not allow one app to read the data that are private to another one. It requires root to bypass this restriction.
Android does provide access to calendar appointments, that's why you find plenty of widgets that display appointments and don't need root.
Maybe including tasks in the calendar app is Samsung specific and therefore not included in the official Android functionality.

Post Reply