-4

Microsoft Office Project 2007 introduces effective work weeks and calendar exceptions, where all calendar data is associated with a set of "valid from/to" dates. --Microsoft Office Dev Center

Google also uses this feature.

Does Android Calendar (pre-ICS) support these features too? I tried Googling, but only found incomplete posts, such as https://stackoverflow.com/questions/13633577/android-8-sdk-14-recurring-event-exception.

I learned on a separate post that the way to access the calendar was through a content provider, however I have found no working solution

(for example, I tried using "content://com.android.calendar/exception", but it results in an exception saying that it is an unknown url).

Any help to steer me in the right direction would be extremely helpful, as I have been Googling to no avail, and this try and try again stuff is not working well.

Community
  • 1
  • 1
daniel m
  • 415
  • 6
  • 15
  • 4
    I don't understand your question at all. Add exceptions where? Also, what recurring events? Why would you add an exception to the calendar? – Shade Apr 10 '13 at 12:06
  • I have the same problem with you, my post is here http://stackoverflow.com/questions/16915993/make-exception-event-from-original-recurring-event – Tai Tran Jun 25 '13 at 07:43

2 Answers2

0

No. Android Calendar exceptions are officially supported starting with ICS (API level 14):

CONTENT_EXCEPTION_URI

-- Android Developer Guide

Some versions may allow you to use the Uri you discuss, since it is derived from the source code:

public static final String AUTHORITY = "com.android.calendar";
public static final Uri CONTENT_EXCEPTION_URI = Uri.parse("content://" + AUTHORITY + "/exception");

//hence, CONTENT_EXCEPTION_URI = Uri.parse("content://com.android.calendar/exception");

however since it is not officially supported, it should not be considered reliable.

Phil
  • 35,852
  • 23
  • 123
  • 164
  • Hi @Phil I got this error 'java.lang.IllegalArgumentException: Unknown URL content://com.android.calendar/exception', My full topic is here http://stackoverflow.com/questions/16915993/make-exception-event-from-original-recurring-event – Tai Tran Jun 25 '13 at 07:42
0

To answer your first question, yes, older Android has ability to have exceptions to a repeating event.

Since that API was introduced in API 14, It's probably a lot different than the previous versions' code. This link has some hints on getting events from calendars on older versions.

NoBugs
  • 9,310
  • 13
  • 80
  • 146