Note that there are some explanatory texts on larger screens.

plurals
  1. POCannot read recurring events from android calendar programmatically
    primarykey
    data
    text
    <p>I have followed the tutorial in this link - <a href="http://jimblackler.net/blog/?p=151&amp;cpage=2#comment-52767" rel="noreferrer">http://jimblackler.net/blog/?p=151&amp;cpage=2#comment-52767</a> to access the internal android calendar database (even though it is not officially supported by the SDK). It works for all entries except for recurring events. The cursor does not return any recurring events at all. Can someone help me here. Following is my cursor declaration - </p> <pre><code> String[] projection = new String[] { "title", "description", "dtstart", "eventLocation" }; String selection = "(calendar_id=" + calID + ")AND " + (now - window) + "&lt;dtstart AND dtstart&lt; " + (now + (window)); String sortorder = "dtstart ASC"; Cursor managedCursor = getCalendarManagedCursor(projection, selection, "events", sortorder); private Cursor getCalendarManagedCursor(String[] projection, String selection, String path, String sort) { Uri calendars = Uri.parse("content://calendar/" + path); Cursor managedCursor = null; try { managedCursor = getContentResolver().query(calendars, projection, selection, null, sort); } catch (IllegalArgumentException e) { Log.w(DEBUG_TAG, "Failed to get provider at [" + calendars.toString() + "]"); } if (managedCursor == null) { // try again calendars = Uri.parse("content://com.android.calendar/" + path); try { managedCursor = getContentResolver().query(calendars, projection, selection, null, sort); } catch (IllegalArgumentException e) { Log.w(DEBUG_TAG, "Failed to get provider at [" + calendars.toString() + "]"); }` </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload