4

first of all read the following question

delete events from Calendar Provider on Android

iam having the same problem... so i delete an event and its still visible in calendar ...to make it to make it disappear,i have to tap menu button and press "synchronize" ...

so is there any way to call it programmatically ?

i would ask him there but i dont have 50 reputation :(

// or at least voteup my question so i can ask him there :D

4

1 回答 1

2

正如您所注意到的,在事件同步到服务器之前,删除事件并不会真正从数据库中删除该行。这很合乎逻辑,否则日历同步适配器将无法检索事件数据以向服务器发送 DELETE 请求。这就是为什么在事件表中有一个 DELETED 列,在查询事件时必须检查它:

http://developer.android.com/reference/android/provider/CalendarContract.SyncColumns.html#DELETED

顺便说一句,如果您查询实例而不是事件(它会扩展重复事件),已删除的事件会自动从结果中删除。

强制同步只是一种黑客行为,因为无论如何网络可能不可用......

于 2013-09-26T09:50:59.213 回答