Dim econ As EventConstants ' This type comes from DonManfred's GoogleCalendarClient library
Dim ECON_INSTANCE_BEGIN As String = "begin"
Dim ECON_INSTANCE_END As String = "end"
Dim ECON_INSTANCE_EVENT_ID As String = "event_id"
Dim eventInstanceProjection() As String = Array As String(econ.ID, econ.ALL_DAY, econ.AVAILABILITY, _
econ.CALENDAR_ACCESS_LEVEL, econ.DESCRIPTION, econ.DTEND, _
econ.DTSTART, econ.DURATION, econ.LOCATION, _
econ.ORGANIZER, econ.TITLE, econ.CUSTOM_APP_PACKAGE, _
econ.CUSTOM_APP_URI, econ.DISPLAY_COLOR, econ.EVENT_COLOR, _
econ.EVENT_COLOR_KEY, econ.EVENT_END_TIMEZONE, econ.EVENT_TIMEZONE, _
econ.EXDATE, econ.EXRULE, econ.RDATE, _
econ.RRULE, econ.STATUS, econ.SYNC_ID, _
econ.VISIBLE, ECON_INSTANCE_BEGIN, ECON_INSTANCE_END, _
ECON_INSTANCE_EVENT_ID)
Dim repeatRecurringInstancesFrom As Long = DateTime.Add(DateTime.Now, 0, -1, 0) ' DateTime from
Dim repeatRecurringInstancesTo As Long = DateTime.Add(DateTime.Now, 0, 1, 0)' DateTime to
Dim instanceSelectionArgs() As String
Dim instanceURI As Uri
instanceURI.Parse("content://com.android.calendar/instances/when/")
instanceURI.WithAppendedPath(instanceURI, repeatRecurringInstancesFrom)
instanceURI.WithAppendedPath(instanceURI, repeatRecurringInstancesTo)
Dim crsr As Cursor = cr.Query(instanceURI, eventInstanceProjection, "", instanceSelectionArgs, ECON_INSTANCE_EVENT_ID & " ASC")
'...