How to Add recurring events programatically?
<p>i am developing an application for adding events to calendar. i am using following code to insert recurring event but it force closes the application with an error "java.lang.IllegalArgumentException: DTEND and DURATION cannot both be null for an event."</p>

<p>code:</p>

<pre><code>    ContentValues event = new ContentValues();
    event.put("calendar_id", 1);
    event.put("title", "Event Title");
    event.put("description", "Event Desc");
    event.put("eventLocation", "Event Location");
    event.put("dtstart", Long.parseLong("1315432844000"));
    event.put("rrule", "FREQ=WEEKLY;WKST=SU;BYDAY=WE");
    event.put("allDay", 1);   // 0 for false, 1 for true
    event.put("eventStatus", 1);
    event.put("hasAlarm", 1); // 0 for false, 1 for true
    Uri url = getContentResolver().insert(eventsUri, event);
</code></pre>

<p>Thanks in Advance </p>
