i have sync adapter handles syncing calendars , events. able delete normal events fine. whenever delete recurring event, events on calendar disappear.
one thing noticed whenever deleted recurring event, instances
table emptied, explains events disappearing. events
table expected, recurring event row deleted table.
what causing this?
i have tried deleting in following ways:
resolver.delete( contenturis.withappendedid(events.content_uri, id), null, null ); resolver.delete( events.content_uri, events._id + " = ?", new string[]{id} );
and syncadapter
:
resolver.delete( events.content_uri.buildupon() .appendqueryparameter(calendarcontract.caller_is_syncadapter, "true") .appendqueryparameter(calendars.account_name, account.name) .appendqueryparameter(calendars.account_type, account.type) .build(), events._id + " = ?", new string[]{id} );
all methods work correctly on non-recurring events, cause instances
table emptied when deleting recurring event.
update
one thing noticed logcat spits out following error
- application:
system_process
- tag:
bufferqueue
- pid:
1187
- tid:
1518
[com.android.calendar/com.android.calendar.allinoneactivity] bufferqueue:drainqueuelocked: timeout waiting on consumer!
it turned out error on part. when syncadapter
adding calendars database, not setting field sync_events
(http://developer.android.com/reference/android/provider/calendarcontract.calendarcolumns.html#sync_events). specifically, field should set 1
.
it difficult know issue because still able technically "sync" (push events server , pull events server), running issue events disappearing.
i hope helps else too.
Comments
Post a Comment