Standardizing Calendar and Todo/Tasks ContentProviders in Android

118 views
Skip to first unread message

A.Grunewald

unread,
Sep 17, 2009, 5:56:43 PM9/17/09
to android-platform, min...@gmail.com, id...@todoroo.com
Resulting from a chat on the #android-dev channel I am starting this
new discussion topic.

The Android API (currently 1.6) contains a standard Content Provider
for Contacts but not for Calendar or Tasks. There is a Content
Provider for Calendar in the Android devices with Google Calendar see
http://source.android.com/projects#TOC-Packages and there is even a
content Provider for Tasks within the open source application Astrid
http://groups.google.com/group/astrid-power/browse_thread/thread/903abe1222be82d3/21dd63dff7a7ee5f#21dd63dff7a7ee5f
so the pieces are there it's a matter of putting them together and
standardizing them.

What are the benefits of this ?

The first benefit is that applications that use Calendar or Task Data
can now access the same pool of information shared across the device.
So a person can for example have an Agenda Widget that shows the next
Task and Calendar entries but those same entries could also be used by
the Calendar Application. Another advantage would be synchronization
with 3rd party Calendar and Task providers. A synchronization plug-in
would not have to be developed for each and every application but
rather only for one Content Provider and would then be available to
all applications that use the Content Provider. You could have all
kids of sync plug-ins that would have to be written only once and then
all applications could benefit from it. It would reduce development
effort for all sides and would allow application developers to focus
on their application independent of the cloud data source of the Data.
Developing this new API could help with the development of powerful
PIM applications across all Android Handsets. Since the Content
Providers might not be available on older versions of Android they
should also be packaged as an application so that older versions can
also benefit from the providers.

All this is an effort to keep fragmentation of android to a minimum
and still allow for larger customizations, reduce the development
effort for individual developers and to improve the seamless
experience for the Users.

Regards Andreas

Eric F

unread,
Sep 22, 2009, 1:54:52 AM9/22/09
to android-platform
I think this is a great idea. I think the important place to start is
envisioning all the possible use cases and the ramifications on how
the content providers and data should be stored in order to
(eventually) support all desirable features. First releases don't have
to include everything, but should be designed to be future proof to be
truly successful as a standard.

Certainly to name a few would be:

Exporting the contacts into other formats (backup, transfer to other
locations)
Live synchronization with various sources (Exchange, Google Calendar,
etc)
Repeating events
Tasks without deadlines
Tasks with deadlines
Repeating tasks
Multiple calendars
Busy / Not Busy computation from events
Per application meta-data storage on events that won't interfere with
other application-specific data

-E

On Sep 17, 2:56 pm, "A.Grunewald" <andreas.grunew...@gmail.com> wrote:
> Resulting from a chat on the #android-dev channel I am starting this
> new discussion topic.
>
> The Android API (currently 1.6) contains a standard Content Provider
> for Contacts but not for Calendar or Tasks. There is a Content
> Provider for Calendar in the Android devices with Google Calendar seehttp://source.android.com/projects#TOC-Packagesand there is even a
> content Provider for Tasks within the open source application Astridhttp://groups.google.com/group/astrid-power/browse_thread/thread/903a...

A.Grunewald

unread,
Sep 22, 2009, 7:23:28 AM9/22/09
to android-platform
Hello Eric,
some great ideas. I have just yesterday downloaded the source code for
the Google Calendar app and the Calendar Content Provider to have a
look at. I am also going to look at the Astrid source code and am
going to try to get the developers involved. Ideally we can separate
the contentProvider from the sync plugins and the actual applications
using the data.
In which ways do you think you could contribute to this effort ?
I also want to point out that I have put in an issue in the Android
Issue Tracker here the link
http://code.google.com/p/android/issues/detail?id=3935

Would be great if we could focus the work on the issue there and the
discussions here.

Regards

Andreas
> > Provider for Calendar in the Android devices with Google Calendar seehttp://source.android.com/projects#TOC-Packagesandthere is even a

Tim Su

unread,
Sep 22, 2009, 3:33:43 AM9/22/09
to android-platform
Hi this is Tim, I'm wrote Astrid 3.0's content provider for Tasks, so
I thought I'd jump into this discussion. Here's what I have right now
(though whole platform is currently in development). A lot of the
information in the current implementation Astrid-specific, so we can
figure out how to make it more universal. That said, here's what I
have right now:

Task:
- id
- title - string description of task
- urgency - integer representing when a task is due
- importance - integer representing the value of completing a task
- due date - time the task is due (corresponds to urgency value)
- hidden until - when a task should become visible to the user
- creation date
- completion date

Urgency within Astrid is one of these values:
- none
- today
- this week
- this month
- within 3 months
- within 6 months
- within a year
- specific day
- specific day & time

Importance within Astrid is one of these values:
- none
- should do
- must do
- do or die

Basically, the importance and urgency capture the idea that a task
needs to be completed by a certain time, and not completing the task
has certain repercussions.

In addition, because Astrid is extensible by third parties, I have
another content provider for metadata, which are namespaced key/value
pairs that can be attached to tasks. For example, I wrote an example
plugin that adds tagging capability to tasks. Tag data is stored with
Key = Tag and Value = name of the tag.

Some different plugins that have been proposed (and therefore our
content provider should be able to handle):

- adding one or more notes to a task
- stopwatch for time spent on a task
- repeating tasks
- adding a photo/sound/video attachment
- attaching a contact and an action (call, e-mail)
- GTD concepts: contexts, projects
- synchronization information for external services (remote id's, what
folders/lists this task belongs to)
- reminders and alarms

My goal with re-writing Astrid is that it would become a platform for
tasks that takes care of the hard work of UI presentation and
interface. Other folks could then write plugins that help them do what
they want to do - synchronize with other services, add menu items to
quickly do common operations, etc.

Hope that's helpful,

Tim
> > Provider for Calendar in the Android devices with Google Calendar seehttp://source.android.com/projects#TOC-Packagesandthere is even a

A.Grunewald

unread,
Sep 23, 2009, 7:30:06 AM9/23/09
to android-platform
Hi Tim,
great that you chimed in, so I assume that you would be happy to
collaborate on this idea further ?
I think what you have already is quite good and if we could find more
universal ways of expressing some of the attributes that might be
helpful. How would you prefer to work on this? As I don't know what
the current status of your code is and how you would see things moving
forward ideally.
Maybe we should compare current Applications for tasks and create a
table of attributes that are universal, as I think there are some that
are a given. Then we should think of what the core attributes are that
need to be used in order to make a task application useful. And beyond
that we might think of how we can add-on functionality in a modular
way. I like the key/value idea a lot.

Cheers

Andreas
> > > Provider for Calendar in the Android devices with Google Calendar seehttp://source.android.com/projects#TOC-Packagesandthereis even a

A.Grunewald

unread,
Sep 23, 2009, 8:14:29 AM9/23/09
to android-platform
Just two more thoughts on Todos

one I think we should align the standard ContentProvider with the
VTODO standard from the iCalendar spec
see
http://en.wikipedia.org/wiki/ICalendar#To-do_.28VTODO.29
and
http://www.ietf.org/rfc/rfc2445.txt

also having an eye on http://code.google.com/p/gdata-issues/issues/detail?id=987
to keep the gData APIs in mind might help also.

Just thoughts.

Regards

Andreas
> > > > Provider for Calendar in the Android devices with Google Calendar seehttp://source.android.com/projects#TOC-Packagesandthereiseven a
Reply all
Reply to author
Forward
0 new messages